Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.os.Bundle.clone()' on a null object reference at com.wix.reactnativenotifications.core.notification.PushNotificationProps.asBundle (PushNotificationProps.java:26) at com.wix.reactnativenotifications.RNNotificationsModule.getInitialNotification (RNNotificationsModule.java:92) at java.lang.reflect.Method.invoke at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188) at com.facebook.react.bridge.queue.NativeRunnable.run at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27) at android.os.Looper.loop (Looper.java:246) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228) at java.lang.Thread.run (Thread.java:923)
Bug Report
From Google Cloud Console:
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.os.Bundle.clone()' on a null object reference at com.wix.reactnativenotifications.core.notification.PushNotificationProps.asBundle (PushNotificationProps.java:26) at com.wix.reactnativenotifications.RNNotificationsModule.getInitialNotification (RNNotificationsModule.java:92) at java.lang.reflect.Method.invoke at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188) at com.facebook.react.bridge.queue.NativeRunnable.run at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27) at android.os.Looper.loop (Looper.java:246) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228) at java.lang.Thread.run (Thread.java:923)
Seems to be a known issue in the react-native-notifiactions package. See Issues: https://github.com/wix/react-native-notifications/issues/835
Environment
Possible Solutions
A proposed solution can be found here: https://github.com/wix/react-native-notifications/issues/910 and here: https://github.com/wix/react-native-notifications/issues/835#issuecomment-1257085942
Fix: