android - Firebase 崩溃报告错误 : client application com. xxxx 被阻止

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

我已经在我的项目中成功实现了 FCM 和 Firebase 分析,但我在尝试使用 Firebase 崩溃报告时发现了一个错误,我不知道我遗漏了什么。

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

Server did not receive report: Origin Error message: Requests from this Android client application com.xxxxxx are blocked.

在谷歌和这里(堆栈溢出)中挖掘后,我发现了一些相关问题( link 1 , link 2 , link 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。

更新 奇怪的是,我在 Analytics(分析)部分收到报告,如您在下一个屏幕截图中所见:

enter image description here



查看项目 console.developers.google.com我发现我启用了 Mobile Crash and Performance Reporting 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 应用程序文件的信息来帮助我,这里是:

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

最佳答案

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

关于android - Firebase 崩溃报告错误 : client application com. xxxx 被阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41775278/

相关文章:

android - Android 布局中的透明度会影响性能吗?

android - POJO类的本质

Android FCM 错误 FirebaseInstanceId : Error while delivering the message: ServiceIntent not found

android - 我在 Android 应用程序中使用多个 firebase 项目。我收到此错误 : Missing google_app_id. Firebase Analytics 已禁用

angular - 找不到模块 '@firebase/app-types/private' - Firebase 抛出错误

Twitter 身份验证 : 403 Forbidden: The server understood the request, 但拒绝履行

java - 如何使计时器运行的应用程序

android - Cordova 发布内置 APK 无法在 Android 上安装

google-apps-script - 当从已部署公司的项目中调用 google script web app url 时,得到 java.io.IOException : Server returned HTTP response code: 403 for URL:

html - 尝试显示 SVG <图像> 时如何修复 403 错误?