java.io.IOException: FIS_AUTH_ERROR in Android Firebase
All you have to do is just make the API key you are using has permission to the following APIs:
- Firebase Installations API
- Firebase Cloud Messaging API
- FCM Registration API
- Cloud Messaging
You can change the restrictions from your google cloud -> APIs & Services -> Credentials
Temporary but working solution. Just downgrade com.google.firebase:firebase-messaging:20.1.2
to com.google.firebase:firebase-messaging:20.1.0
. Apperantly, there is some kind of bug in 20.1.1
and 20.1.2
versions. App doesn't crash anymore.
UPDATE (11.04.2020): I tested in com.google.firebase:firebase-messaging:20.1.5
and apperantly problem has been fixed.
UPDATE (26.04.2020):
I found a permanent solution. First upgrade firebase dependencies to com.google.firebase:firebase-messaging:20.1.6. After that download google-services.json from firebase. Replace it with the current one. After that build > clean project
otherwise you can get
API key expired. Please renew the API key
error. There is no problem with the key, it's some kind of bug of Google. If you completed these steps, add following code into onCreate of your top Application class which is you declared in manifest at the application tag.
FirebaseOptions options = new FirebaseOptions.Builder()
.setApplicationId("APP ID") // Required for Analytics.
.setProjectId("PROJECT ID") // Required for Firebase Installations.
.setApiKey("GOOGLE API KEY") // Required for Auth.
.build();
FirebaseApp.initializeApp(this, options, "FIREBASE APP NAME");
You can found your app id in the firebase > project settings. Also if you're debugging, don't forget to add the debug SHA-256
key to firebase.
Now I don't get crash anymore. Firebase services work perfectly.