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]: Google Play Console is Reporting Crashes and ANR errors and Siting OneSignal in the Trace #1022

Open
2 of 3 tasks
selected-pixel-jameson opened this issue Sep 25, 2024 · 0 comments

Comments

@selected-pixel-jameson
Copy link

What happened?

When I submit my build to Google Play Console it does a pre-launch report. The pre-launch report is siting Crashes which include a reference to OneSignal. This is the only 3rd party library listed on the stack trace.

Steps to reproduce?

Implement the OneSignal Cordova Plugin in an Ionic Capacitor App. 
Build and Android App
Submit the App to the Google Play Console
Check the Pre-Launch Report

What did you expect to happen?

The app to not crash

OneSignal Cordova SDK version

5.2.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

exception java.lang.RuntimeException: Unable to destroy activity {com.keycollectorcomics.keycollector/com.keycollectorcomics.keycollector.MainActivity}: java.lang.Exception: Must call 'initWithContext' before use
  at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5454)
  at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:5487)
  at android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:47)
  at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2253)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:201)
  at android.os.Looper.loop (Looper.java:288)
  at android.app.ActivityThread.main (ActivityThread.java:7870)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1003)
Caused by java.lang.Exception: Must call 'initWithContext' before use
  at com.onesignal.internal.OneSignalImp.getNotifications (OneSignalImp.kt:99)
  at com.onesignal.OneSignal.getNotifications (OneSignal.kt:62)
  at com.onesignal.cordova.OneSignalPush.onDestroy (OneSignalPush.java:703)
  at org.apache.cordova.PluginManager.onDestroy (PluginManager.java:326)
  at com.getcapacitor.cordova.MockCordovaWebViewImpl.handleDestroy (MockCordovaWebViewImpl.java:182)
  at com.getcapacitor.Bridge.onDestroy (Bridge.java:1354)
  at com.getcapacitor.BridgeActivity.onDestroy (BridgeActivity.java:126)
  at android.app.Activity.performDestroy (Activity.java:8339)
  at android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1376)
  at androidx.test.runner.MonitoringInstrumentation.callActivityOnDestroy (MonitoringInstrumentation.java:1)
  at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5441)

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant