Firebase Crash Reporting error: client application

2020-06-01 07:06发布

问题:

I have implemented FCM and Firebase analytics with success in my project but I found an error trying with Firebase crash reporting and I don't have any idea what I'm missing.

I'm just trying to use Firebase crash reporting following the official tutorial and getting this error:
It said:

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

After dig in google and here (stack overflow), I found some related questions ( link 1, link 2, link 3) but none of their solutions work for me. I mean, someone talk about check API_KEY, someone else talk about check crash report enabled in console and the list keep going. I have tried those answers before posting this question.

update: Explaining a little bit for those didn't want to look above links: I tried updating the google-services.json file changing the API_KEY, deleting and adding again SHA1, leaving API_KEY empty, etc. Downloading the google-services.json file for each change I did with no luck.

My API_KEY in my google-services.json file looks like:

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

And I checked that my google-service.json has debug and release SHA1.

update The weird thing is that I'm getting reports in Analytics section, as you can see in next screenshot:



Looking the project in console.developers.google.com I found that I have Mobile Crash and Performance Reporting API enabled (like you can see in the follow screenshot):



After clicking in "Mobile Crash and Performance Reporting API" I got this: The image above shows 2 images: all traffic to "Mobile Crash and Performance Reporting API" done and the errors processed by the API. As you can see it said that all my request were 403 Error (you can see it where it said 403:0.0004): and that's true, I've tried 4 times and all time I got same console error.

No idea what is going on or what I'm missing

If you need info about gradle app file to help me, here is:

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'

回答1:

I had the same issue, solved it by setting the API key Key restriction in Google Console to NONE.



回答2:

I had the same issue, resolved it by download a new configuration file google-services.json.



回答3:

I had similar problems and I tried dropping the gradle levels, which helped me because of some stability issues in the newest ones.

to:

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'

also you sdk to :

compileSdkVersion 23
buildToolsVersion "21.1.2"

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