I got error while running flutter webview: E/MethodChannel#flutter/platform_views( 3411): Failed to handle method call . SUPPRESS_ERROR_PAGE
Asked Answered
B

3

5

i just bought flutter webview source code from https://docs.meetmighty.com/mightyweb/

i had follow the instruction from documentation and run the source code but unsucessfull, and shown error as follows:

E/MethodChannel#flutter/platform_views( 3411): Failed to handle method call
E/MethodChannel#flutter/platform_views( 3411): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
E/MethodChannel#flutter/platform_views( 3411):  at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views( 3411):  at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views( 3411):  at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
E/MethodChannel#flutter/platform_views( 3411):  at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
E/MethodChannel#flutter/platform_views( 3411):  at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
E/MethodChannel#flutter/platform_views( 3411):  at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:525)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:170)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter/platform_views( 3411):  at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter/platform_views( 3411):  at android.os.Handler.handleCallback(Handler.java:938)
E/MethodChannel#flutter/platform_views( 3411):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter/platform_views( 3411):  at android.os.Looper.loop(Looper.java:246)
E/MethodChannel#flutter/platform_views( 3411):  at android.app.ActivityThread.main(ActivityThread.java:8625)
E/MethodChannel#flutter/platform_views( 3411):  at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 3411):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/MethodChannel#flutter/platform_views( 3411):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/flutter ( 3411): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Unknown feature SUPPRESS_ERROR_PAGE, null, java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE

the full console log you can see on: https://pastebin.com/EhcZMS1w

i have tried: flutter clean, gradlew clean, reinstall flutter, reinstall android studio with no luck

i'd had install:

  • android studio jellyfish 2023.3.1 patch 1

my java version java 21.0.3 2024-04-16 LTS Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152) Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)

flutter doctor result: here is result after run flutter docter

hereby i attached the source code if you want to build it self: https://drive.google.com/file/d/18zlzF1WbY-bakX-RcjufMPxhEfXoidPw/view?usp=sharing

i have tried: flutter clean, gradlew clean, reinstall flutter, reinstall android studio with no luck

i'd had install:

  • android studio jellyfish 2023.3.1 patch 1

the creator of source code had tried to fix this, but no success.

what should i do? sorry for my bad english. please help me.

Benilda answered 3/6, 2024 at 5:47 Comment(0)
B
7

I got that error too. I first used these versions of webview in pubspec.yaml.

webview_flutter: 4.8.0
flutter_inappwebview: ^6.0.0

Then I downgraded to these.

webview_flutter: 4.7.0
flutter_inappwebview: ^6.0.0

Finally I added this depedency_override to override the web_view version for android and it works.

dependency_overrides:
  webview_flutter_android: 3.16.1

So the final changes of pubspec.yaml are

  webview_flutter: 4.7.0
  flutter_inappwebview: ^6.0.0
dependency_overrides:
  webview_flutter_android: 3.16.1
Brunell answered 6/6, 2024 at 2:32 Comment(0)
B
1

I had this error too.

I downgraded from:

youtube_player_flutter: ^9.0.1

to:

youtube_player_flutter: ^8.1.0  // or ^8.1.2, latest in the 8 series

This fixed it.

Balboa answered 8/6, 2024 at 22:30 Comment(2)
there's no 8.0.1 version pub.dev/packages/youtube_player_flutter/versions maybe you meant 8.1.0 ?Cindacindee
The suggestion worked for me. However the OP is about webview_flutter, not youtube_player_flutter. Both libraries are related through flutter_inappwebview, but this answer may be moved/linked to a question about youtube_player_flutter.Intercurrent
A
0

Yeah i removed webView and just kept one dependency flutter_inappwebview so that worked.

Allowedly answered 4/8, 2024 at 17:2 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.