Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: AlertDialogPrepromptForAndroidSettings.show #729

Open
1 task done
Hardik7265 opened this issue May 10, 2024 · 1 comment
Open
1 task done

[Bug]: AlertDialogPrepromptForAndroidSettings.show #729

Hardik7265 opened this issue May 10, 2024 · 1 comment

Comments

@Hardik7265
Copy link

What happened?

The latest version of SDK cause crash in Samsung Device Galaxy A13.

Error:- Caused by android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@e4bc233 is not valid; is your activity running?

Steps to reproduce?

1. Install latest SDK.
2. Install build in Samsung Device Galaxy A13.
3. Crash or error in device.

What did you expect to happen?

I expected it should not crash and continue to work.

Unity version

2023.2.20f1

OneSignal Unity SDK version

5.1.4

Platform

Android

Relevant log output

Caused by android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@e4bc233 is not valid; is your activity running?
       at android.view.ViewRootImpl.setView(ViewRootImpl.java:1764)
       at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:567)
       at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
       at android.app.Dialog.show(Dialog.java:521)
       at android.app.AlertDialog$Builder.show(AlertDialog.java:1153)
       at com.onesignal.core.internal.permissions.AlertDialogPrepromptForAndroidSettings.show(AlertDialogPrepromptForAndroidSettings.kt:65)
       at com.onesignal.notifications.internal.permissions.impl.NotificationPermissionController.showFallbackAlertDialog(NotificationPermissionController.kt:139)
       at com.onesignal.notifications.internal.permissions.impl.NotificationPermissionController.onReject(NotificationPermissionController.kt:124)
       at com.onesignal.core.activities.PermissionsActivity.onRequestPermissionsResult$lambda-0(PermissionsActivity.kt:114)
       at com.onesignal.core.activities.PermissionsActivity.$r8$lambda$_fGz_SOmbIhPQvxRD-41f99MrRo()
       at com.onesignal.core.activities.PermissionsActivity$$ExternalSyntheticLambda0.run(:4)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8757)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shepherd-l
Copy link
Contributor

Thanks for reporting! We are looking into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants