I am getting device registration token for android when using APKs for distribution using below code
FirebaseMessaging.getInstance().getToken()
But same thing is getting failed when I am using App bundles for the distribution on AppCenter or Google Play store. Getting below error
Failed to get firebase instance id token with exception java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR
I am using below firebase libraries
implementation 'com.google.firebase:firebase-messaging:23.1.2'
implementation "com.google.firebase:firebase-core:21.1.1"
Below are some of checks I already did
- Checked proguard rules added (-keep class com.google.firebase.** { ; } -keep class com.google.android.gms.* { *; }) to the proguard-rules.pro file
- Checked Restricted keys from GC console and did make sure that SHA-1 are matching with the signing keys that I am using for generating app bundles.
- While debugging on the Android studio, able to generate device token and able to send sample push notification from FCM console, but when I built the app bundle and upload it to App Center and install it from there, then its not working (giving above mentioned error) because of this I am not able to register for receiving any push notifications.
I really appreciate if someone can help on this how to fix this?