react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

iOS: Multiple notification open events received before the JS notifications module has been initialized

Open d-vincent opened this issue 7 years ago • 5 comments

When tapping a notification on iOS to open the app, the onNotification method is not firing. I am met with the message: "Multiple notification open events received before the JS notifications module has been initialized" and I am not sure what to do. I am calling "NotifService.configure();" in the root file outside of the lifecycle, and I am also calling "PushNotification.popInitialNotification((notification) => {})" which does not fire on iOS. It is also worth noting that onNotification does not fire even when the app is in the foreground. I am also using FCM to send these notifications as opposed to GCM. Everything is working fine and as expected on Android. Any help?

d-vincent avatar Mar 27 '19 15:03 d-vincent

I'm having the same issue for local notifications. Any updates?

markus-utke avatar Jun 26 '19 18:06 markus-utke

Did anyone solve this issue yet?

mathiasmoeller avatar Jun 04 '20 13:06 mathiasmoeller

Didn't really solve it, however I noticed that for me this only happens after a reload. When I rebuild the app the notifications work fine.

markus-utke avatar Jun 04 '20 15:06 markus-utke

To get these working on my end I eventually just used a different approach. Since I am sending the notifications through firebase, I am importing the messaging module from rnfirebase and calling messaging.notifications().onNotificationOpened() and messaging.notifications().getInitialNotification().

d-vincent avatar Jun 04 '20 16:06 d-vincent

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 05 '21 00:06 github-actions[bot]