Firebase崩溃报告错误:客户端应用程序com.xxxx被阻止

时间:2017-01-21 02:54:01

标签: android firebase http-status-code-403 firebase-crash-reporting

我已经在我的项目中成功实施了FCM和Firebase分析,但我发现使用Firebase崩溃报告时出错,我不知道我缺少什么。

我只是尝试在the official tutorial之后使用Firebase崩溃报告并收到此错误:
enter image description here 它说:

  

服务器未收到报告:原始错误消息:来自此Android客户端应用程序com.xxxxxx 的请求被阻止

在谷歌和这里(堆栈溢出)挖掘后,我发现了一些相关的问题( link 1link 2link 3)但他们的解决方案都不适合我。我的意思是,有人谈论检查API_KEY,其他人谈论在控制台中启用检查崩溃报告,列表继续。在发布此问题之前,我已尝试过这些答案。

更新:为那些不想查看以上链接的人解释一下:我尝试更新google-services.json文件,更改API_KEY,删除并再次添加SHA1,将API_KEY留空下载google-services.json文件,我做的每次更改都没有运气。

我的google-services.json文件中的API_KEY如下所示:

"api_key": [
    {
      "current_key": "AIzaxxxxxxxxxxzxxxxxx"
    },
    {
      "current_key": "AIzaxxxxxxxxxxxxxx"
    }
  ],

我检查了我的google-service.json是否已调试并释放SHA1。

更新 奇怪的是,我在分析部分收到了报告,您可以在下一个屏幕截图中看到:

enter image description here



查看console.developers.google.com中的项目我发现我的移动崩溃和性能报告API 已启用(您可以在以下屏幕截图中看到):

enter image description here

点击“Mobile Crash and Performance Reporting API”后,我得到了这个: enter image description here 上图显示了2张图片:完成了“Mobile Crash and Performance Reporting API”的所有流量以及API处理的错误。你可以看到它说我所有的请求都是 403错误(你可以看到它说的地方403:0.0004):这是真的,我已经尝试了4次而且我有同样的控制台错误。

不知道发生了什么或我缺少什么

如果您需要有关gradle app文件的信息来帮助我,请点击此处:

  

编译'com.google.firebase:firebase-core:10.0.1'     编译'com.google.firebase:firebase-messaging:10.0.1'     编译'com.google.firebase:firebase-crash:10.0.1'     编译'com.google.android.gms:play-services-maps:10.0.1'     编译'com.google.android.gms:play-services-location:10.0.1'     编译'com.google.android.gms:play-services-awareness:10.0.1'

3 个答案:

答案 0 :(得分:5)

我遇到了同样的问题,通过将Google控制台中的API密钥Key restriction设置为NONE来解决此问题。

答案 1 :(得分:2)

我遇到了同样的问题,通过下载新的配置文件google-services.json解决了这个问题。

答案 2 :(得分:1)

我遇到了类似的问题,我试图放弃gradle级别,这对我有所帮助,因为最新的问题存在一些稳定性问题。

为:

compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-messaging:9.2.1'
compile 'com.google.firebase:firebase-crash:9.2.1'
compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.google.android.gms:play-services-location:9.2.1'
compile 'com.google.android.gms:play-services-awareness:9.2.1'

你也可以:

compileSdkVersion 23
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "cloud.savari.example.com.fcm"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}