GooglePlaces API “Response That We Couldn't Understand” Error

烂漫一生 提交于 2019-12-01 17:00:38

问题


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?


回答1:


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




回答2:


This issue has been filed with Google, Google has identified the bug, and they are currently working on a fix. Issue tracking: https://issuetracker.google.com/issues/64280749

See: why loading places in iOS using google places api causes lookup place id query error?

thank-you: @trishcode



来源:https://stackoverflow.com/questions/45852056/googleplaces-api-response-that-we-couldnt-understand-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!