Agasper / unity-android-notifications

Unity3D Plugin for Android local notifications with example project
Other
555 stars 184 forks source link

Local notification on Android causes crash #101

Open mogurito opened 6 years ago

mogurito commented 6 years ago

Hi we released our game yesterday and received some crash logs on Google console.

`Samsung Galaxy S9 (starlte), Android 8.0 Report 1

java.lang.RuntimeException: at android.app.ActivityThread.handleReceiver (ActivityThread.java:3397) at android.app.ActivityThread.-wrap18 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1780) at android.os.Handler.dispatchMessage (Handler.java:105) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6938) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374) Caused by: java.lang.NullPointerException: at net.agasper.unitynotification.UnityNotificationManager.onReceive (UnityNotificationManager.java:153) at android.app.ActivityThread.handleReceiver (ActivityThread.java:3390)`

We used the notification.jar that is inside the UnityProject example commited May 21.

siadark commented 5 years ago

looks like we have the same stack of crash on android 8.0 and 7.0 with the latest plugin

java.lang.Error: FATAL EXCEPTION [main] Unity version : 5.6.6f2 Device model : HUAWEI BAH-L09 Device fingerprint: HUAWEI/BAH/HWBAH-Q:7.0/HUAWEIBAH-L09/C170B271:user/release-keys Caused by at android.app.ActivityThread.handleReceiver (ActivityThread.java:3202) at android.app.ActivityThread.-wrap18 (ActivityThread.java) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1664) at android.os.Handler.dispatchMessage (Handler.java:105) at android.os.Looper.loop (Looper.java:156) at android.app.ActivityThread.main (ActivityThread.java:6623) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832) Caused by: java.lang.IllegalArgumentException: at android.app.NotificationManager.notifyAsUser (NotificationManager.java:318) at android.app.NotificationManager.notify (NotificationManager.java:293) at android.app.NotificationManager.notify (NotificationManager.java:277) at net.agasper.unitynotification.UnityNotificationManager.onReceive (UnityNotificationManager.java:219) at android.app.ActivityThread.handleReceiver (ActivityThread.java:3192)