EddyVerbruggen / nativescript-webview-utils

🕸Add request headers to a NativeScript WebView. Perhaps more utils later.
Apache License 2.0
20 stars 17 forks source link

Exception: `Calling js method onReceivedError failed` #23

Open DerZyklop opened 2 years ago

DerZyklop commented 2 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Started App, opened chrome://inspect/#devices in Chrome on Computer. Clicked inspect on the emulator entry. App inside emulator crashed.

Exception:

Calling js method onReceivedError failed 
Error: JNI Exception occurred (SIGABRT).
=======
Check the 'adb logcat' for additional information about the error.
=======

StackTrace
push.../node_modules/nativescript-webview-utils/webview-utils.js.WebViewUtils.onReceivedError(file:///data/data/de.emscon.plano/files/app/vendor.js:76026:46)
    at com.tns.Runtime.callJSMethodNative(Native Method)
    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302)
    at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188)
    at com.tns.Runtime.callJSMethod(Runtime.java:1175)
    at com.tns.Runtime.callJSMethod(Runtime.java:1153)
    at com.tns.Runtime.callJSMethod(Runtime.java:1149)
    at com.tns.gen.android.webkit.WebViewClient_vendor_75960_28_WebViewUtils.onReceivedError(WebViewClient_vendor_75960_28_WebViewUtils.java:72)
    at g9.handleMessage(chromium-TrichromeWebViewGoogle6432.apk-stable-447211484:124)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Is there any code involved?

Very simple app:

<Page class="page"
    loaded="pageLoaded"
    xmlns="http://schemas.nativescript.org/tns.xsd"
    backgroundSpanUnderStatusBar="true"
    backgroundColor="#cd7415"
    iosOverflowSafeAreaEnabled="false"
>
    <GridLayout>
        <WebView
            iosOverflowSafeAreaEnabled="true"
            row="1" loaded="onWebViewLoaded" id="webView"
        >
        </WebView>
    </GridLayout>
</Page>