flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
162.21k stars 26.64k forks source link

[webview_flutter] Getting error Didn't find class "android.webkit.PacProcessor" on Android 9 (API28) #145323

Closed aezakmi8 closed 1 month ago

aezakmi8 commented 1 month ago

web_view_issue.zip

Steps to reproduce

  1. Create a new Flutter project or use an existing one.
  2. Add the webview_flutter package to your project's pubspec.yaml file and run flutter pub get.
  3. Replace the existing main.dart file with the sample widget provided above or download the attached web_view_issue.zip and extract the contents to your project directory.
  4. Run the project on an Android 9 device or emulator.
  5. Observe the console/logcat output and the behavior of the web view.

Expected results

  1. The console/logcat should not display any errors related to the web view.
  2. The content of the webpage should load completely without any partial loading or failure to load."

Actual results

  1. The console/logcat displays errors related to the web view.
  2. The content of the webpage either loads partially or fails to load completely.

Code sample

Code sample ```dart import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: const Text('Flutter Demo Home Page'), ), body: const Center( child: WebView(), ), ), ); } } class WebView extends StatefulWidget { const WebView({super.key}); @override State createState() => _WebViewState(); } class _WebViewState extends State with WidgetsBindingObserver { late final WebViewController _controller; @override void initState() { super.initState(); _controller = WebViewController.fromPlatformCreationParams( const PlatformWebViewControllerCreationParams(), ) ..setJavaScriptMode(JavaScriptMode.unrestricted) ..loadRequest(Uri.parse('https://flutter.dev')); _controller.setJavaScriptMode(JavaScriptMode.unrestricted); } @override void dispose() { _controller.clearCache(); super.dispose(); } @override Widget build(BuildContext context) { _controller.setBackgroundColor(Theme.of(context).colorScheme.background); return Builder(builder: (context) { return WebViewWidget( controller: _controller, ); }); } } ```

Screenshots or Video

Screenshots / Video demonstration [Upload media here]

Logs

Logs ```console [+1298 ms] I/WebViewFactory(21638): Loading com.google.android.webview version 122.0.6261.105 (code 626110501) [ +3 ms] W/linker (21638): Warning: "/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk!/lib/arm64-v8a/libwebviewchromium.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring) [ +37 ms] I/.web_view_issu(21638): Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/PacProcessor; [ +1 ms] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459) [ ] I/.web_view_issu(21638): at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi, java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (BasicMessageChannel.java:261) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int, io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873) [ ] I/.web_view_issu(21638): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99) [ ] I/.web_view_issu(21638): at void android.os.Looper.loop() (Looper.java:193) [ ] I/.web_view_issu(21638): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680) [ ] I/.web_view_issu(21638): at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) [ ] I/.web_view_issu(21638): at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495) [ ] I/.web_view_issu(21638): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858) [ ] I/.web_view_issu(21638): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.PacProcessor" on path: DexPathList[[zip file "/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/lib/arm64, /data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk!/lib/arm64-v8a, /system/lib64, /odm/lib64, /vendor/lib64, /product/lib64]] [ ] I/.web_view_issu(21638): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459) [ ] I/.web_view_issu(21638): at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi, java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (BasicMessageChannel.java:261) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int, io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873) [ ] I/.web_view_issu(21638): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99) [ ] I/.web_view_issu(21638): at void android.os.Looper.loop() (Looper.java:193) [ ] I/.web_view_issu(21638): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680) [ ] I/.web_view_issu(21638): at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) [ ] I/.web_view_issu(21638): at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495) [ ] I/.web_view_issu(21638): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858) [ ] I/.web_view_issu(21638): [ ] I/.web_view_issu(21638): Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/PacProcessor; [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459) [ ] I/.web_view_issu(21638): at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi, java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (BasicMessageChannel.java:261) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int, io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873) [ ] I/.web_view_issu(21638): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99) [ ] I/.web_view_issu(21638): at void android.os.Looper.loop() (Looper.java:193) [ ] I/.web_view_issu(21638): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680) [ ] I/.web_view_issu(21638): at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) [ ] I/.web_view_issu(21638): at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495) [ ] I/.web_view_issu(21638): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858) [ ] I/.web_view_issu(21638): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.PacProcessor" on path: DexPathList[[zip file "/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/lib/arm64, /data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk!/lib/arm64-v8a, /system/lib64, /odm/lib64, /vendor/lib64, /product/lib64]] [ ] I/.web_view_issu(21638): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2) [ ] I/.web_view_issu(21638): at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176) [ ] I/.web_view_issu(21638): at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459) [ ] I/.web_view_issu(21638): at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194) [ ] I/.web_view_issu(21638): at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi, java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232) [ ] I/.web_view_issu(21638): at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (BasicMessageChannel.java:261) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int, io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319) [ ] I/.web_view_issu(21638): at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1) [ ] I/.web_view_issu(21638): at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873) [ ] I/.web_view_issu(21638): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99) [ ] I/.web_view_issu(21638): at void android.os.Looper.loop() (Looper.java:193) [ ] I/.web_view_issu(21638): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680) [ ] I/.web_view_issu(21638): at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) [ ] I/.web_view_issu(21638): at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495) [ ] I/.web_view_issu(21638): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858) [verbose_run.txt](https://github.com/flutter/flutter/files/14637546/verbose_run.txt) ```

Flutter Doctor output

Doctor output ```console [√] Flutter (Channel stable, 3.19.0, on Microsoft Windows [Version 10.0.19045.4046], locale ru-RU) • Flutter version 3.19.0 on channel stable at C:\Users\nefidov\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision bae5e49bc2 (5 weeks ago), 2024-02-13 17:46:18 -0800 • Engine revision 04817c99c9 • Dart version 3.3.0 • DevTools version 2.31.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at C:\Program Files (x86)\Android\android-sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = C:\Program Files (x86)\Android\android-sdk • ANDROID_SDK_ROOT = C:\Program Files (x86)\Android\android-sdk • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.8.0) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools • Visual Studio Build Tools 2022 version 17.8.34309.116 ! Unable to locate a Windows 10 SDK. If building fails, install the Windows 10 SDK in Visual Studio. [√] Android Studio (version 2023.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) [√] VS Code, 64-bit edition (version 1.72.2) • VS Code at C:\Program Files\Microsoft VS Code • Flutter extension version 3.60.0 [√] Connected device (4 available) • LLD L31 (mobile) • FPMNW18807007023 • android-arm64 • Android 9 (API 28) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.4046] • Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.200 • Edge (web) • edge • web-javascript • Microsoft Edge 122.0.2365.66 [√] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```
danagbemava-nc commented 1 month ago

Hi @aezakmi8, is this limited to android 9 or are other versions of android affected as well?

What version of webview_flutter & webview_flutter_android are you using?

aezakmi8 commented 1 month ago

What version of webview_flutter & webview_flutter_android are you using?

Also I've tested on webview_flutter: ^4.7.0, same error

this limited to android 9 or are other versions of android affected as well?

As far as I know, the reason is the error that the android.webkit.PacProcessor class is used, which is only available in Android 12 and above

drexhacker commented 1 month ago

Hello there am having the exact same issue on Android 8 but 12 is very ok. Actually on Android 8 the app is Crashing.

danagbemava-nc commented 1 month ago

Hi @aezakmi8, do you also get the crash on android 9?

@drexhacker, does it crash for you every time or occasionally?

aezakmi8 commented 1 month ago

Hi @aezakmi8, do you also get the crash on android 9?

@drexhacker, does it crash for you every time or occasionally?

No, on Android 9 crash is not happening

Аn error appears in the console and the content of the webpage either loads partially or fails to load completely

danagbemava-nc commented 1 month ago

Hi @aezakmi8, do you see the android.webkit.PacProcessor error every time? I am testing on android emulator running android 9 but I don't see those error messages from logcat. The warnings, I see are related to the OnBackInvokedCallback and some sidecar related messages.

aezakmi8 commented 1 month ago

error every time?

The error appears every time we navigate to the screen with WebView

I am testing on Physical device HONOR 9 Lite (LLD-L31) and reading logs from logcat

danagbemava-nc commented 1 month ago

Hi @aezakmi8, I tested this on a Nokia 6 running android 9 and while I do see the error, the website content is fully loaded with no issues. I also saw the logs from flutter itself.

Аn error appears in the console and the content of the webpage either loads partially or fails to load completely

Regarding this, does it ever load the site fully for you?

aezakmi8 commented 1 month ago

and while I do see the error, the website content is fully loaded

Web Content loads with a delay (5-30 sec) sometimes it does not fully loads

This is critical because in my application this screen is responsible for paying on an external web site for order payment.

drexhacker commented 1 month ago

Hi @aezakmi8, do you also get the crash on android 9?

@drexhacker, does it crash for you every time or occasionally?

Sorry the crush was not made by webview_flutter.

danagbemava-nc commented 1 month ago

Hi @aezakmi8, does the progress only get stuck on the HONOR 9 Lite? You can check emulators or other devices to see if happens with them as well.

Can you add a navigation delegate that will help up knoww at which level/percentage it gets stuck at? You can define the delegate like so

..setNavigationDelegate(
        NavigationDelegate(
          onProgress: (int progress) {
            // Update loading bar.
            print("progress: ($progress)");
          },
        ),
      )
sylduc commented 1 month ago

web_view_issue.zip

Steps to reproduce

  1. Create a new Flutter project or use an existing one.
  2. Add the webview_flutter package to your project's pubspec.yaml file and run flutter pub get.
  3. Replace the existing main.dart file with the sample widget provided above or download the attached web_view_issue.zip and extract the contents to your project directory.
  4. Run the project on an Android 9 device or emulator.
  5. Observe the console/logcat output and the behavior of the web view.

Expected results

  1. The console/logcat should not display any errors related to the web view.
  2. The content of the webpage should load completely without any partial loading or failure to load."

Actual results

  1. The console/logcat displays errors related to the web view.
  2. The content of the webpage either loads partially or fails to load completely.

Code sample

Code sample

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: const Text('Flutter Demo Home Page'),
        ),
        body: const Center(
          child: WebView(),
        ),
      ),
    );
  }
}

class WebView extends StatefulWidget {
  const WebView({super.key});

  @override
  State<WebView> createState() => _WebViewState();
}

class _WebViewState extends State<WebView> with WidgetsBindingObserver {
  late final WebViewController _controller;

  @override
  void initState() {
    super.initState();

    _controller = WebViewController.fromPlatformCreationParams(
      const PlatformWebViewControllerCreationParams(),
    )
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..loadRequest(Uri.parse('https://flutter.dev'));

    _controller.setJavaScriptMode(JavaScriptMode.unrestricted);
  }

  @override
  void dispose() {
    _controller.clearCache();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    _controller.setBackgroundColor(Theme.of(context).colorScheme.background);

    return Builder(builder: (context) {
      return WebViewWidget(
        controller: _controller,
      );
    });
  }
}

Screenshots or Video

Screenshots / Video demonstration [Upload media here]

Logs

Logs

[+1298 ms] I/WebViewFactory(21638): Loading com.google.android.webview version 122.0.6261.105 (code 626110501)
[   +3 ms] W/linker  (21638): Warning: "/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk!/lib/arm64-v8a/libwebviewchromium.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0)
(ignoring)
[  +37 ms] I/.web_view_issu(21638): Rejecting re-init on previously-failed class java.lang.Class<WV.aH>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/PacProcessor;
[   +1 ms] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459)
[        ] I/.web_view_issu(21638):   at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi,
java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) 
(D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply)
(BasicMessageChannel.java:261)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int,
io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99)
[        ] I/.web_view_issu(21638):   at void android.os.Looper.loop() (Looper.java:193)
[        ] I/.web_view_issu(21638):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680)
[        ] I/.web_view_issu(21638):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
[        ] I/.web_view_issu(21638): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.PacProcessor" on path: DexPathList[[zip file
"/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/lib/arm64,
/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk!/lib/arm64-v8a, /system/lib64, /odm/lib64, /vendor/lib64, /product/lib64]]
[        ] I/.web_view_issu(21638):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459)
[        ] I/.web_view_issu(21638):   at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi,
java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) 
(D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply)
(BasicMessageChannel.java:261)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int,
io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99)
[        ] I/.web_view_issu(21638):   at void android.os.Looper.loop() (Looper.java:193)
[        ] I/.web_view_issu(21638):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680)
[        ] I/.web_view_issu(21638):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
[        ] I/.web_view_issu(21638): 
[        ] I/.web_view_issu(21638): Rejecting re-init on previously-failed class java.lang.Class<WV.aH>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/PacProcessor;
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459)
[        ] I/.web_view_issu(21638):   at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi,
java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) 
(D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply)
(BasicMessageChannel.java:261)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int,
io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99)
[        ] I/.web_view_issu(21638):   at void android.os.Looper.loop() (Looper.java:193)
[        ] I/.web_view_issu(21638):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680)
[        ] I/.web_view_issu(21638):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
[        ] I/.web_view_issu(21638): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.PacProcessor" on path: DexPathList[[zip file
"/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/lib/arm64,
/data/app/com.google.android.webview-XkxCacm-u79tjIcV4OsC9g==/base.apk!/lib/arm64-v8a, /system/lib64, /odm/lib64, /vendor/lib64, /product/lib64]]
[        ] I/.web_view_issu(21638):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
[        ] I/.web_view_issu(21638):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:176)
[        ] I/.web_view_issu(21638):   at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:459)
[        ] I/.web_view_issu(21638):   at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:251)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage android.webkit.WebStorage.getInstance() (WebStorage.java:194)
[        ] I/.web_view_issu(21638):   at android.webkit.WebStorage io.flutter.plugins.webviewflutter.WebStorageHostApiImpl$WebStorageCreator.createWebStorage() (WebStorageHostApiImpl.java:30)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.WebStorageHostApiImpl.create(java.lang.Long) (WebStorageHostApiImpl.java:48)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$-CC.lambda$setup$0(io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi,
java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) (GeneratedAndroidWebView.java:3232)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugins.webviewflutter.GeneratedAndroidWebView$WebStorageHostApi$$ExternalSyntheticLambda0.onMessage(java.lang.Object, io.flutter.plugin.common.BasicMessageChannel$Reply) 
(D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply)
(BasicMessageChannel.java:261)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, int) (DartMessenger.java:292)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(java.lang.String, int,
io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo, java.nio.ByteBuffer, long) (DartMessenger.java:319)
[        ] I/.web_view_issu(21638):   at void io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run() (D8$$SyntheticClass:-1)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:873)
[        ] I/.web_view_issu(21638):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99)
[        ] I/.web_view_issu(21638):   at void android.os.Looper.loop() (Looper.java:193)
[        ] I/.web_view_issu(21638):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6680)
[        ] I/.web_view_issu(21638):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:495)
[        ] I/.web_view_issu(21638):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)

[verbose_run.txt](https://github.com/flutter/flutter/files/14637546/verbose_run.txt)

Flutter Doctor output

Doctor output

[√] Flutter (Channel stable, 3.19.0, on Microsoft Windows [Version 10.0.19045.4046], locale ru-RU)
    • Flutter version 3.19.0 on channel stable at C:\Users\nefidov\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bae5e49bc2 (5 weeks ago), 2024-02-13 17:46:18 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)  

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Program Files (x86)\Android\android-sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = C:\Program Files (x86)\Android\android-sdk
    • ANDROID_SDK_ROOT = C:\Program Files (x86)\Android\android-sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java       
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.8.0)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
    • Visual Studio Build Tools 2022 version 17.8.34309.116
    ! Unable to locate a Windows 10 SDK. If building fails, install the Windows 10 SDK in Visual Studio.

[√] Android Studio (version 2023.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)

[√] VS Code, 64-bit edition (version 1.72.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.60.0

[√] Connected device (4 available)
    • LLD L31 (mobile)  • FPMNW18807007023 • android-arm64  • Android 9 (API 28)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [Version 10.0.19045.4046]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 119.0.6045.200
    • Edge (web)        • edge             • web-javascript • Microsoft Edge 122.0.2365.66

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

I have the same logs, also on a real device with Android 9. It's not crashing, but the logs are the same. Only on the first build of the webview

github-actions[bot] commented 1 month ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 2 weeks ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.