wix / react-native-notifications

React Native Notifications
MIT License
3.25k stars 764 forks source link

java.lang.NullPointerException - Attempt to invoke virtual method 'boolean android.app.NotificationChannel.isDeleted()' #878

Closed faustaleonardo closed 2 years ago

faustaleonardo commented 2 years ago
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.NotificationChannel.isDeleted()' on a null object reference
       at android.os.Parcel.createException(Parcel.java:1972)
       at android.os.Parcel.readException(Parcel.java:1934)
       at android.os.Parcel.readException(Parcel.java:1884)
       at android.app.INotificationManager$Stub$Proxy.getNotificationChannelGroup(INotificationManager.java:2281)
       at android.app.NotificationManager.getNotificationChannelGroup(NotificationManager.java:598)
       at com.wix.reactnativenotifications.core.notification.NotificationChannel.setNotificationChannel(NotificationChannel.java:57)
       at com.wix.reactnativenotifications.RNNotificationsModule.setNotificationChannel(RNNotificationsModule.java:140)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:873)
       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:233)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
       at java.lang.Thread.run(Thread.java:764)

Any idea on how to solve this?

"react-native-notifications": "4.1.0",
"react-native": "0.65.1"

Apparently it only affects Realme and Oppo smartphones with Android 9

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 2 years ago

The issue has been closed for inactivity.

xKRUTOIx commented 1 year ago

I see the same crash in crashlytics, is there any updates on this?

(using the latest version of the library 4.3.3 and RN 0.71.2)