Skip to content
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

React Native Notifications crashes android app #273

Open
ovbm opened this issue Nov 1, 2022 · 1 comment
Open

React Native Notifications crashes android app #273

ovbm opened this issue Nov 1, 2022 · 1 comment
Labels
android Android specific bug Something isn't working critical

Comments

@ovbm
Copy link
Contributor

ovbm commented Nov 1, 2022

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: wix/react-native-notifications#835

Environment

  • OS: Android 11 and above
  • App Version: 2.2.0

Possible Solutions

A proposed solution can be found here:
wix/react-native-notifications#910
and here: wix/react-native-notifications#835 (comment)

Fix:

  1. Update to 4.3.2
  2. Apply patch: https://gist.github.com/pepf/742d4772545400919aece5649402b9e7
@ovbm ovbm added bug Something isn't working critical android Android specific labels Nov 1, 2022
@trm217 trm217 self-assigned this Nov 2, 2022
@trm217 trm217 removed their assignment Dec 7, 2022
@kg-currenxie
Copy link

kg-currenxie commented Feb 17, 2023

Same error here! (patch worked)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android specific bug Something isn't working critical
Projects
None yet
Development

No branches or pull requests

3 participants