From 99f6a799dd1491d14cca41566cf4e0b0446a4d4b Mon Sep 17 00:00:00 2001 From: djmaze <7229+djmaze@users.noreply.github.com> Date: Fri, 18 Jul 2025 14:42:48 +0200 Subject: [PATCH] On Android, do not set the client or bridge interface properties on the nativeView additionally to calling the setter methods As reported here, this seems to fix the sporadic "Cannot find runtime for.." crashes on Android: https://github.com/nativescript-community/ui-webview/issues/22#issuecomment-2940171442 --- src/webview/index.android.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/webview/index.android.ts b/src/webview/index.android.ts index c556e52..72ce011 100644 --- a/src/webview/index.android.ts +++ b/src/webview/index.android.ts @@ -662,20 +662,16 @@ export class AWebView extends WebViewExtBase { const client = this.createWebViewClient(this, WebViewExtClient); nativeView.setWebViewClient(client); - nativeView.client = client; } else { const client = new WebViewExtClient(this); nativeView.setWebViewClient(client); - nativeView.client = client; } const chromeClient = new WebChromeViewExtClient(this); nativeView.setWebChromeClient(chromeClient); - nativeView.chromeClient = chromeClient; const bridgeInterface = new WebViewBridgeInterface(this); nativeView.addJavascriptInterface(bridgeInterface, 'androidWebViewBridge'); - nativeView.bridgeInterface = bridgeInterface; } public disposeNativeView() {