Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.RuntimeException: Unknown feature REQUESTED_WITH_HEADER_CONTROL #1611

Closed
2 tasks done
ctemkar opened this issue Apr 4, 2023 · 5 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@ctemkar
Copy link

ctemkar commented Apr 4, 2023

  • I have read the Getting Started section
  • I have already searched for the same problem

Environment

Technology Version
Flutter version
Plugin version
Android version
iOS version
macOS version
Xcode version

Device information:

Description

Expected behavior:
Should work

Current behavior:
Webview doesn't come up

Steps to reproduce

  1. This
  2. Than that
  3. Then

Images

Stacktrace/Logcat

2023-04-04 16:46:36.357 23360-23360 MethodChan...form_views com.vimvest.android.staging2 E Failed to handle method call
java.lang.RuntimeException: Unknown feature REQUESTED_WITH_HEADER_CONTROL
at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:574)
at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:543)
at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:567)
at com.pichillilorenzo.flutter_inappwebview.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
at com.pichillilorenzo.flutter_inappwebview.webview.in_app_webview.FlutterWebView.(FlutterWebView.java:84)
at com.pichillilorenzo.flutter_inappwebview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:44)
at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:503)
at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:163)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
2023-04-04 16:46:36.467 23360-23406 flutter com.vimvest.android.staging2 E [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Unknown feature REQUESTED_WITH_HEADER_CONTROL, null, java.lang.RuntimeException: Unknown feature REQUESTED_WITH_HEADER_CONTROL
at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:574)
at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:543)
at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:567)
at com.pichillilorenzo.flutter_inappwebview.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
at com.pichillilorenzo.flutter_inappwebview.webview.in_app_webview.FlutterWebView.(FlutterWebView.java:84)
at com.pichillilorenzo.flutter_inappwebview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:44)
at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:503)
at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:163)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)

#2 ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1081:5)

#3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:801:5)

[inappwebview-flutter-error-log.tx
main.txt
t](https://github.com/pichillilorenzo/flutter_inappwebview/files/11153443/inappwebview-flutter-error-log.txt)

@ctemkar ctemkar added the bug Something isn't working label Apr 4, 2023
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

👋 @ctemkar

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@MischaKr
Copy link

MischaKr commented Apr 6, 2023

I'm getting the same error after upgrading to latest version of Flutter. (3.7.10)

@jaroslawdabrowski
Copy link

jaroslawdabrowski commented Apr 13, 2023

So I had the same issue. I spent some time to find the reason. It seems that this is due to the dependency bot that have updated the androidx.webkit version from 1.5.0 to 1.6.0 and later also to 1.6.1. The new version of android webkit does not know anything about the REQUESTED_WITH_HEADER_CONTROL and therefore we see this exception.
Short term solution is to downgrade webview_flutter_android, 3.3.0 seems to work fine.

@pichillilorenzo can you or someone from your team take care of it? It seems that REQUESTED_WITH_HEADER_CONTROL is not longer supported, so it has to be removed and cleaned up. Thanks.

@ctemkar
Copy link
Author

ctemkar commented Apr 13, 2023

Thanks a lot, will try it

@pichillilorenzo pichillilorenzo changed the title Problem when used with intercom_flutter java.lang.RuntimeException: Unknown feature REQUESTED_WITH_HEADER_CONTROL May 12, 2023
Copy link

github-actions bot commented Oct 7, 2024

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 and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants