Closed mattnickcodes closed 3 years ago
I suspect you didn't update AppDelegate for Capacitor v3
Take a look in the repo example and review Capacitor's migration guide. There was some breaking changes.
Can you provide a reproducible example?
The solution is making sure the FCM.getToken() function is not called/triggered by any of the PushNotifications functions.
The code I wrote here causes this particular error. I believe it happens because the registration event is being fired before FCM initializes.
PushNotifications.addListener('registration', () => { FCM.getToken().then((token: any)=>this.saveToken(token.value)) });
Glad you figured it out.
After installation of @capacitor/push-notifications and @capacitor-community/fcm I am able to receive push notifications but I am not able to receive a registration token to send messages to individual users.
Here is the error I'm getting: