GooglePlaces API“我们无法理解的响应”错误 [英] GooglePlaces API "Response That We Couldn't Understand" Error

查看:219
本文介绍了GooglePlaces API“我们无法理解的响应”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将标准自动填充代码与搜索栏一起使用:

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:

自动填充错误错误Domain = com.google.places.ErrorDomain Code = -2Places API服务器返回了我们无法理解的响应。如果您认为此错误代表如有错误,请使用我们的社区和支持页面上的说明( https://developers.google。 COM /地区/支持)。

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 = Places API服务器返回了我们无法理解的响应。如果您认为此错误代表错误,请使用我们的社区和支持页面上的说明提交报告( https: //developers.google.com/places/support )。,NSUnderlyingError = 0x600000444380 {Error Domain = com.google.places.server.ErrorDomain Code = -1(null)UserInfo = {NSUnderlyingError = 0x600000444350 {错误域= com.google.HTTPStatus代码= 404未找到UserInfo = {NSLocalizedDescription =未找到}}}}}

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.

见下文:
https://issuetracker.google.com/issues/64280749
https://issuetracker.google.com/issues/64994023

这篇关于GooglePlaces API“我们无法理解的响应”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆