Using the standard autocomplete code with a searchbar:
placesClient.autocompleteQuery(searchBar.textField.text!, bounds: nil, filter: filter, callback: {(results, error) -> Void in
if let error = error {
print("Autocomplete error \(error)")
return
}
if let results = results {
for result in results {
print("Result \(result.attributedFullText) with placeID \(result.placeID)")
self.predictions.append(result)
}
}
self.placesTableView.reloadData()
})
Has been working for months and tonight it started reporting this error:
Autocomplete error Error Domain=com.google.places.ErrorDomain Code=-2 "The Places API server returned a response that we couldn't understand. If you believe this error represents a bug, please file a report using the instructions on our community and support page (https://developers.google.com/places/support)."
UserInfo={NSLocalizedFailureReason=The Places API server returned a response that we couldn't understand. If you believe this error represents a bug, please file a report using the instructions on our community and support page (https://developers.google.com/places/support)., NSUnderlyingError=0x600000444380 {Error Domain=com.google.places.server.ErrorDomain Code=-1 "(null)" UserInfo={NSUnderlyingError=0x600000444350 {Error Domain=com.google.HTTPStatus Code=404 "Not Found" UserInfo={NSLocalizedDescription=Not Found}}}}}
Anyone else experiencing this?
Looks like the service is back up. I raised a ticket with Google.
They identified the issue and are resolving it. Mentioned it could take a few hours.
See below: https://issuetracker.google.com/issues/64280749 https://issuetracker.google.com/issues/64994023
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With