You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have received some crash reports which originate from the notifications module of the React Native Firebase library.
After looking at the source it seemsrescheduleNotifications() (called from the boot receiver) always calls scheduleNotification(...) with a null Promise causing the exception posted below.
To replicate:
Schedule a notification for some future date
Reboot the Android device
Fatal Exception: java.lang.RuntimeException: Unable to start receiver io.invertase.firebase.notifications.RNFirebaseNotificationsRebootReceiver: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3194)
at android.app.ActivityThread.-wrap17(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6501)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
at io.invertase.firebase.notifications.RNFirebaseNotificationManager.scheduleNotification(RNFirebaseNotificationManager.java:708)
at io.invertase.firebase.notifications.RNFirebaseNotificationManager.rescheduleNotifications(RNFirebaseNotificationManager.java:187)
at io.invertase.firebase.notifications.RNFirebaseNotificationsRebootReceiver.onReceive(RNFirebaseNotificationsRebootReceiver.java:16)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3187)
at android.app.ActivityThread.-wrap17(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6501)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Environment
Android
Application Target Platform:
Android
Development Operating System:
Build Tools:
React Native version:
0.53.3
RNFirebase Version:
4.0.3
Firebase Module:
Notifications
The text was updated successfully, but these errors were encountered:
I also had that issue, and played around in the code last week (version 4.0.4). I discovered a follow-up bug: all scheduled notifications are fired instantly after rebooting the device, no matter of their schedule date.
Double fireDate = schedule.getDouble("fireDate"); is always 0 after reboot.
The reason is that number values created by BundleJSONConverter are parsed as Long (i guess in case they have no signs of being floating numbers)
Issue
I have received some crash reports which originate from the notifications module of the React Native Firebase library.
After looking at the source it seems
rescheduleNotifications()
(called from the boot receiver) always callsscheduleNotification(...)
with anull
Promise causing the exception posted below.To replicate:
Environment
Android
Android
0.53.3
4.0.3
Notifications
The text was updated successfully, but these errors were encountered: