I'm doing a GCM to FCM Migration for my app. But when testing my final code on a device I get the following error in my Logcat and the call to Firebase fails.
E/FirebaseInstanceId: Token retrieval failed: RST
There is no information in the Firebase docs what "RST" means etc..
Who can help me out?
EDIT
It doesn't expire though. It renews itself if one of the following happens. According to https://firebase.google.com/docs/cloud-messaging/android/client: -The app deletes Instance ID.
Access the registration token FCM requires a firebase-messaging-sw.js file. Unless you already have a firebase-messaging-sw.js file, create an empty file with that name and place it in the root of your domain before retrieving a token. You can add meaningful content to the file later in the client setup process.
Just try using
FirebaseInstanceId.getInstance().getToken()
And also add
FirebaseOptions.Builder().setGcmSenderId("YOUR_SENDER_ID")
before calling the getToken Method.. Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With