Reputation: 1
When I'm receiving FCM (Firebase Cloud Messages) on my emulator device it's showing this error and App crashed in build not in local. Started happening recently when I upgraded to react native version 0.76
it was not happening earlier.
Error message I'm getting
I tried putting
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Message handled in the background!', remoteMessage);
});
this in index.js
file too as suggested by GPT to register the function used by firebase to handle push notification in background but no success.
Both libraries are updated and firebase setup is as per the docs but I can provide config details if needed.
Thanks for help
Upvotes: 0
Views: 22