phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

App getting crashed when registering for notifications #2709

Open Bhargavi-N opened 5 years ago

Bhargavi-N commented 5 years ago

Platform and Version

Android 8.1.0

(Android) What device vendor

Brand: HMD Global Model: Nokia 2.1 Orientation: Portrait RAM free: 239.33 MB Disk free: 2.48 GB

Exception

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.NotificationChannel.isDeleted()' on a null object reference at android.os.Parcel.readException(Parcel.java:2011) at android.os.Parcel.readException(Parcel.java:1951) at android.app.INotificationManager$Stub$Proxy.getNotificationChannels(INotificationManager.java:1734) at android.app.NotificationManager.getNotificationChannels(NotificationManager.java:480) at com.adobe.phonegap.push.PushPlugin.createDefaultNotificationChannelIfNeeded(SourceFile:150) at com.adobe.phonegap.push.PushPlugin.access$200(SourceFile:40) at com.adobe.phonegap.push.PushPlugin$1.run(SourceFile:189) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

robertolocal commented 5 years ago

Did you find any solution? Same problem here

om-ha commented 4 years ago

I'm getting the same exception/crash... Sometimes at app startup other times sporadically during app lifetime.

Stack Trace

com.onesignal.y.a

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'boolean android.app.NotificationChannel.isDeleted()' on a null object reference

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:1956)
       at android.os.Parcel.readException(Parcel.java:1918)
       at android.os.Parcel.readException(Parcel.java:1868)
       at android.app.INotificationManager$Stub$Proxy.getNotificationChannels(INotificationManager.java:2052)
       at android.app.NotificationManager.getNotificationChannels(NotificationManager.java:637)
       at com.onesignal.y.a(:49)
       at com.onesignal.k1$p.a(:62)
       at com.onesignal.u1.b(:10)
       at com.onesignal.u1.a()
       at com.onesignal.u1$a.a(:2)
       at com.onesignal.v1$e.run(:4)
       at java.lang.Thread.run(Thread.java:764)

android.os.RemoteException

Caused by android.os.RemoteException
Remote stack trace: at com.android.server.notification.RankingHelper.getNotificationChannels(RankingHelper.java:932) at com.android.server.notification.NotificationManagerService$10.getNotificationChannels(NotificationManagerService.java:2617) at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:436) at android.os.Binder.execTransact(Binder.java:756)

Caused by android.os.RemoteException: Remote stack trace:
    at com.android.server.notification.RankingHelper.getNotificationChannels(RankingHelper.java:932)
    at com.android.server.notification.NotificationManagerService$10.getNotificationChannels(NotificationManagerService.java:2617)
    at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:436)
    at android.os.Binder.execTransact(Binder.java:756)

Devices

Crash 1

Device
Brand: LGE
Model: Aristo 4+
Orientation: Portrait
RAM free: 490.31 MB
Disk free: 671.39 MB
Operating System
Version: 9
Orientation: Portrait
Rooted: No
Crash
Date: May 15, 2020, 8:40:00 PM
App version: 5.0.1 (43) 

Crash 2

Device
Brand: samsung
Model: Galaxy S9
Orientation: Portrait
RAM free: 1.04 GB
Disk free: 523.96 MB
Operating System
Version: 9
Orientation: Portrait
Rooted: No
Crash
Date: May 15, 2020, 9:13:00 AM
App version: 5.0.1 (43) 

Crash 3

Device
Brand: INFINIX MOBILITY LIMITED
Model: HOT 8 Lite
Orientation: Portrait
RAM free: 960.82 MB
Disk free: 18.47 GB
Operating System
Version: 8.1.0
Orientation: Portrait
Rooted: No
Crash
Date: May 15, 2020, 3:39:00 AM
App version: 5.0.1 (43)