OneSignal-Unity-SDK icon indicating copy to clipboard operation
OneSignal-Unity-SDK copied to clipboard

[Bug]: PermissionsActivity

Open shefich opened this issue 3 years ago • 9 comments

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 avatar Aug 22 '22 15:08 shefich

@shefich Thank you for reaching out! Have you been able to reproduce this issue? How many reports of this have you gotten?

emawby avatar Aug 25 '22 17:08 emawby

i has the same problem with android 8.1 Untitled

buivanlan avatar Oct 27 '22 22:10 buivanlan

I have the same issue, on the exact same device as well.

azzastudios avatar Nov 02 '22 06:11 azzastudios

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?

azzastudios avatar Nov 02 '22 17:11 azzastudios

same issue Captura de Tela 2023-01-11 às 13 35 58

NiltonFirmino avatar Jan 11 '23 16:01 NiltonFirmino

same issue here: Screen Shot 2023-02-27 at 14 18 25

beeth0ven avatar Feb 27 '23 06:02 beeth0ven

OneSignal Unity SDK version 3.0.10, the issue still persist.

shefich avatar Apr 29 '23 09:04 shefich

I have the same version. Using Flutter with latest packages/versions as of time of writing.

crash

hagen00 avatar Aug 11 '23 10:08 hagen00

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.

shefich avatar Mar 26 '24 14:03 shefich