OneSignal-Unity-SDK
OneSignal-Unity-SDK copied to clipboard
[Bug]: PermissionsActivity
What happened?
I can see a crash in Crashlytics: PermissionsActivity.java line 109.
Steps to reproduce?
1. Install OneSignal 3.0.3
2. Run the app on Android 8, Nexus 5X (as I can see in Crashlytics).
What did you expect to happen?
I expected the app to successfully register callbacks.
Unity version
Unity 2020.3.38f1
OneSignal Unity SDK version
OneSignal 3.0.3
Platform
Android
Relevant log output
Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.xxx.xxx/com.onesignal.PermissionsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2778)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2856)
android.app.ActivityThread.-wrap11
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1589)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:164)
android.app.ActivityThread.main (ActivityThread.java:6494)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)
Caused by java.lang.NullPointerException
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference
com.onesignal.PermissionsActivity.reregisterCallbackHandlers (PermissionsActivity.java:109)
com.onesignal.PermissionsActivity.handleBundleParams (PermissionsActivity.java:100)
com.onesignal.PermissionsActivity.onCreate (PermissionsActivity.java:82)
android.app.Activity.performCreate (Activity.java:7009)
android.app.Activity.performCreate (Activity.java:7000)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1214)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2731)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2856)
android.app.ActivityThread.-wrap11
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1589)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:164)
android.app.ActivityThread.main (ActivityThread.java:6494)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@shefich Thank you for reaching out! Have you been able to reproduce this issue? How many reports of this have you gotten?
i has the same problem with android 8.1

I have the same issue, on the exact same device as well.
I have not been able to reproduce this issue so far, using an emulator of the same device (Nexus 5X). Any idea where this issue would occur?
same issue

same issue here:

OneSignal Unity SDK version 3.0.10, the issue still persist.
I have the same version. Using Flutter with latest packages/versions as of time of writing.
OneSignal 3.0.11 has the same bug. Here (https://github.com/OneSignal/OneSignal-Android-SDK/issues/1720) it gone stale. But the issue still exist and has many occurrences.