Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase messaging.getToken() fails with MISSING_INSTANCEID_SERVICE error

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

like image 279
BolDav Avatar asked Sep 08 '26 21:09

BolDav


1 Answers

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

like image 117
ridwannhidayat Avatar answered Sep 11 '26 19:09

ridwannhidayat