-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] Notification object is missing from remoteMessage when getInitialNotification triggered #4943
Comments
Hi there! |
Sorry, do you mean you have seen this working as expected (sending the notification as well as data through), on emulators? I am seeing this issue occurring on both a physical device and on an emulator. I'll have another go writing this up with more of the template 👍 |
I never test messaging-related things with the expectation they will work, on emulators. Even though Android does deliver FCM to emulators (iOS does not even do that - simulators do not get a token, and do not receive FCM) there have been errors in the past so FCM testing for me is "device-only"
If it is reproducible on a device, then this could be a valid issue!
Thank you - the template contains all sorts of things that we look for and can cause subtle errors, it really is important. Even better is the full JSON payload you send via the FCM REST API (minus any identifiers of course) plus an App.js that by itself - dropped in to a clean project like from https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh - reproduces the problem |
Issue
Upgrading to 7.8.10 to make use of the bug fix for issue 4052. We find that under the specific scenario described in that issue, the notification part of our message does not get included in the remoteMessage.
Steps to replicate:
Expected behaviour: For both notifications, when they are opened
getInitialNotification
gets called with aremoteMessage
containing both data and notificationActual behaviour: For the first notification opened, as expected
getInitialNotification
gets called with aremoteMessage
containing both data and notification. For the second however, theremoteMessage
only contains the data portion of the original messagePlatform that you're experiencing the issue on:
react-native-firebase
version you're using that has this issue:7.8.10
, also replicated in10.8.0
Are you using
TypeScript
?Y
, VERSION 4.1.3The text was updated successfully, but these errors were encountered: