Firebase messaging.getToken() fails with MISSING_INSTANCEID_SERVICE error

5.5k Views Asked by At

I am trying to integrate Firebase Cloud Messaging into an ongoing project. I followed the guide for installation here and installed both @react-native-firebase/app and @react-native-firebase/messaging. However, when I attempt to get device token with await messaging.getToken() it fails with this warning -NativeFirebaseError: [messaging/unknown] MISSING_INSTANCEID_SERVICE

Please note that if I send a push notification from firebase console, it gets delivered on a real phone, which shows that the issues is probably not with the FCM set up.

Any helpful suggestions will be appreciated

1

There are 1 best solutions below

0
On

is emulator have you installed google play??? cause the device cannot generate token without google play. in geymotion: To install, see https://stackoverflow.com/a/20137324/2234894