You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have integrated in-app messaging into my application using OneSignal. I am having this kind of crash on the play console.
Type java.lang.RuntimeException
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5294)
at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:5323)
at android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:44)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:192)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:113)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2228)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:241)
at android.app.ActivityThread.main (ActivityThread.java:7888)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:512)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:998)
Caused by java.lang.Exception: Must call 'initWithContext' before use
at com.onesignal.internal.OneSignalImp.getInAppMessages
at com.onesignal.OneSignal.getInAppMessages (OneSignal.java)
at com.onesignal.rnonesignalandroid.RNOneSignal.removeHandlers (RNOneSignal.java)
at com.onesignal.rnonesignalandroid.RNOneSignal.onHostDestroy (RNOneSignal.java)
at com.facebook.react.bridge.ReactContext.onHostDestroy
at com.facebook.react.ReactInstanceManager.moveToBeforeCreateLifecycleState
at com.facebook.react.ReactInstanceManager.onHostDestroy
at com.facebook.react.ReactInstanceManager.onHostDestroy
at com.facebook.react.ReactDelegate.onHostDestroy
at com.facebook.react.ReactActivityDelegate.onDestroy
at com.facebook.react.ReactActivity.onDestroy
at android.app.Activity.performDestroy (Activity.java:8245)
at android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1355)
at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5279)
Steps to reproduce?
I am not able to re-produce and I am not getting any crashes on my real device.
What did you expect to happen?
I have integrated in-app messaging into my application using OneSignal.
React Native OneSignal SDK version
5.0.3
Which platform(s) are affected?
iOS
Android
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
@virenradadiya thank you for reaching out! This looks like you may be trying to call some InAppMessage namespace methods before fully initializing OneSignal. Could you please provide some additional information about how and when you're calling these methods? Thanks!
nan-li
changed the title
[Bug]: I am having crash on playconsole.
[Bug]: getInAppMessages causing initWithContext exception
Jan 17, 2024
What happened?
I have integrated in-app messaging into my application using OneSignal. I am having this kind of crash on the play console.
Type
java.lang.RuntimeException
Steps to reproduce?
What did you expect to happen?
I have integrated in-app messaging into my application using OneSignal.
React Native OneSignal SDK version
5.0.3
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: