🔥 Notification Object Missing in getInitialNotification() After Restart (Android) #5167
Closed
2 of 9 tasks
Labels
help: needs-triage
Issue needs additional investigation/triaging.
platform: android
plugin: messaging
FCM only - ( messaging() ) - do not use for Notifications
type: bug
New bug report
Workflow: Needs Review
Pending feedback or review from a maintainer.
Issue
The issue is similar (or perhaps the same) as described here: #4634
However, there was either a regression, or it wasn't fully fixed.
Notification object is missing if you do this:
The notification object will be missing in getInitialNotification()
In a normal/correct case you get this:
In the broken case described above, you get:
Project Files
I put together a minimal reproduction here: https://github.com/mcorner/ReproMessagingBug/
Though it is just a stock RN app with enough code to get the FCM token and print the results of getInitialNotification()
Javascript
Click To Expand
https://github.com/mcorner/ReproMessagingBug/blob/master/App.js
package.json
:https://github.com/mcorner/ReproMessagingBug/blob/master/package.json
firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
N/A, Android issue.
ios/Podfile
:N/A, Android issue.
AppDelegate.m
:N/A, Android issue.
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:https://github.com/mcorner/ReproMessagingBug/blob/master/android/app/build.gradle
android/settings.gradle
:https://github.com/mcorner/ReproMessagingBug/blob/master/android/settings.gradle
MainApplication.java
:https://github.com/mcorner/ReproMessagingBug/blob/master/android/app/src/main/java/com/repromessagingbug/MainApplication.java
AndroidManifest.xml
:https://github.com/mcorner/ReproMessagingBug/blob/master/android/app/src/main/AndroidManifest.xml
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:TypeScript
?The text was updated successfully, but these errors were encountered: