Questions
Loop and app crash when opening push notifications with targetUrl in a new navigation level
last month by Lester
Hi,
I am testing a OneSignal push notification with a targetUrl to my app on Android.
When I open the notification and the app was closed, I see that the app is trying to open the page in a new navigation level (which is good). But it seems there is a some kind of endless loop occurring here. The content of the page is not visible during this loop and the app crashes. This is an error I have found in Android Studio:
W Application attempted to call on a destroyed WebView
java.lang.Throwable
at org.chromium.android_webview.AwContents.p(chromium-TrichromeWebViewGoogle.aab-stable-593806031:10)
at org.chromium.android_webview.AwContents.j(chromium-TrichromeWebViewGoogle.aab-stable-593806031:2)
at com.android.webview.chromium.WebViewChromium.evaluateJavaScript(chromium-TrichromeWebViewGoogle.aab-stable-593806031:46)
at android.webkit.WebView.evaluateJavascript(WebView.java:893)
at co.median.android.LeanWebView.runJavascript(LeanWebView.java:259)
at co.median.android.MainActivity.checkReadyStatus(MainActivity.java:1490)
at co.median.android.MainActivity$1.lambda$run$0(MainActivity.java:158)
at co.median.android.MainActivity$1.$r8$lambda$nJw6o1IrdGOFomxICG07g4zGfLs(Unknown Source:0)
at co.median.android.MainActivity$1$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at android.app.Activity.runOnUiThread(Activity.java:7317)
at co.median.android.MainActivity$1.run(MainActivity.java:158)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)