entronad / flutter_echarts

A Flutter widget to use Apache ECharts in a reactive way.

Home Page:https://pub.dev/packages/flutter_echarts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebView.destroy() called while WebView is still attached to window.

gtuceturan opened this issue · comments

when change chart page this error show me 2.4.0v

I am also experiencing this.

flutter_echarts: 2.4.0

I use the Echarts widget in its own view. For example, similar to:

@OverRide
Widget build(BuildContext context) {
return Echarts(
option: model.httpOptions,
reloadAfterInit: true,
),
}

The error I experience is:

W/cr_AwContents(26586): WebView.destroy() called while WebView is still attached to window.
W/cr_AwContents(26586): Application attempted to call on a destroyed WebView
W/cr_AwContents(26586): java.lang.Throwable
W/cr_AwContents(26586): at org.chromium.android_webview.AwContents.m(chromium-TrichromeWebViewGoogle.aab-stable-530410530:10)
W/cr_AwContents(26586): at com.android.webview.chromium.WebViewChromium.clearCache(chromium-TrichromeWebViewGoogle.aab-stable-530410530:27)
W/cr_AwContents(26586): at android.webkit.WebView.clearCache(WebView.java:1427)
W/cr_AwContents(26586): at io.flutter.plugins.webviewflutter.WebViewHostApiImpl.clearCache(WebViewHostApiImpl.java:420)
W/cr_AwContents(26586): at io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebViewHostApi.lambda$setup$12(GeneratedAndroidWebView.java:998)
W/cr_AwContents(26586): at io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebViewHostApi$$ExternalSyntheticLambda21.onMessage(Unknown Source:2)
W/cr_AwContents(26586): at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:217)
W/cr_AwContents(26586): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
W/cr_AwContents(26586): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
W/cr_AwContents(26586): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
W/cr_AwContents(26586): at android.os.Handler.handleCallback(Handler.java:938)
W/cr_AwContents(26586): at android.os.Handler.dispatchMessage(Handler.java:99)
W/cr_AwContents(26586): at android.os.Looper.loop(Looper.java:246)
W/cr_AwContents(26586): at android.app.ActivityThread.main(ActivityThread.java:8653)
W/cr_AwContents(26586): at java.lang.reflect.Method.invoke(Native Method)
W/cr_AwContents(26586): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
W/cr_AwContents(26586): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
W/cr_AwContents(26586): Application attempted to call on a destroyed WebView
W/cr_AwContents(26586): java.lang.Throwable
W/cr_AwContents(26586): at org.chromium.android_webview.AwContents.m(chromium-TrichromeWebViewGoogle.aab-stable-530410530:10)
W/cr_AwContents(26586): at com.android.webview.chromium.WebViewChromium.reload(chromium-TrichromeWebViewGoogle.aab-stable-530410530:27)
W/cr_AwContents(26586): at android.webkit.WebView.reload(WebView.java:927)
W/cr_AwContents(26586): at io.flutter.plugins.webviewflutter.WebViewHostApiImpl.reload(WebViewHostApiImpl.java:414)
W/cr_AwContents(26586): at io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebViewHostApi.lambda$setup$11(GeneratedAndroidWebView.java:969)
W/cr_AwContents(26586): at io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebViewHostApi$$ExternalSyntheticLambda20.onMessage(Unknown Source:2)
W/cr_AwContents(26586): at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:217)
W/cr_AwContents(26586): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
W/cr_AwContents(26586): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
W/cr_AwContents(26586): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
W/cr_AwContents(26586): at android.os.Handler.handleCallback(Handler.java:938)
W/cr_AwContents(26586): at android.os.Handler.dispatchMessage(Handler.java:99)
W/cr_AwContents(26586): at android.os.Looper.loop(Looper.java:246)
W/cr_AwContents(26586): at android.app.ActivityThread.main(ActivityThread.java:8653)
W/cr_AwContents(26586): at java.lang.reflect.Method.invoke(Native Method)
W/cr_AwContents(26586): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
W/cr_AwContents(26586): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

What caused the error:

Pressing the back button/popping the view with Echarts Widget.

same issue

commented

Could you confirm if you truly lack a resolution?

Please try v2.5.0:

  • Upgrade webview_flutter to 4.2.4
  • Upgrade Echarts to 5.4.3
  • Upgrade SDK to >=2.12.0 <4.0.0