Open zurie opened 5 years ago
@cyanglaz @amirh I hear you are the guys to goto for native views and the webview_flutter plugin? Anything else you want from me or would like me to update?
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.648], locale en-US)
• Flutter version 1.2.1 at C:\Development\flutter
• Framework revision 8661d8aecd (4 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\Zuriel\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[!] Android Studio (version 3.3)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5
• Flutter plugin version 33.4.2
• Dart plugin version 183.5912.23
[!] VS Code, 64-bit edition (version 1.26.1)
• VS Code at C:\Program Files\Microsoft VS Code
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 2 categories.
I tried a few webpages... some work, some don't .. not sure if its console errors or ads or certain scripts, etc, etc...
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class WebViewExample extends StatefulWidget {
WebViewExample({Key key, @required this.webpage}) : super(key: key);
final dynamic webpage;
@override
_WebViewExample createState() => _WebViewExample();
}
class _WebViewExample extends State<WebViewExample> {
final Completer<WebViewController> _controller =
Completer<WebViewController>();
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.red,
// title: Text('test'),
title: Text("title"),
// This drop down menu demonstrates that Flutter widgets can be shown over the web view.
),
// We're using a Builder here so we have a context that is below the Scaffold
// to allow calling Scaffold.of(context) so we can show a snackbar.
body: Builder(builder: (BuildContext context) {
return Stack(
children: <Widget>[
WebView(
initialUrl: "https://www.bible.com/events/577274",
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return NavigationDecision.navigate;
},
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
},
),
]);
}),
);
}
}
Relevant crash from the log seems to be(formatted):
E/AndroidRuntime(20167): java.lang.IllegalArgumentException: reasonPhrase can't be empty.
E/AndroidRuntime(20167): at android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase(WebResourceResponse.java:139)
E/AndroidRuntime(20167): at android.webkit.WebResourceResponse.<init>(WebResourceResponse.java:77)
E/AndroidRuntime(20167): at xl.a(PG:292)
E/AndroidRuntime(20167): at afG.handleMessage(PG:67)
E/AndroidRuntime(20167): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(20167): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(20167): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(20167): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(20167): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(20167): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I don't know what's the obfuscated part of the trace that constructs a WebResourceResponse without a reason phrase, I'd suspect this is an issue with a specific platform WebView and not related to Flutter.
You should be able to confirm this assumption by creating a non Flutter Android app that loads this page into a webview and running it on the same device.
I made a new android app. and made a webview and it seems to be ok? I dont know what I should be looking for but the logs are going bananas with this is this the same thing you were talking about? It just runs forever or is that something else not related. also is what we have a bug or is it something else? How should I proceed with my flutter app? should I wait for a webview fix or are you saying that its not flutter but the device i am using? etc. I don't have a physical android device but i am considering it for testing.
2019-03-15 19:35:06.358 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@246f06d)
2019-03-15 19:35:06.359 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@246f06d)
2019-03-15 19:35:07.358 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@6c3c4a2)
2019-03-15 19:35:07.359 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@6c3c4a2)
2019-03-15 19:35:07.516 1878-1878/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2019-03-15 19:35:07.516 1878-1878/? E/netmgr: WifiForwarder unable to open QEMU pipe: Invalid argument
2019-03-15 19:35:08.359 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@e904533)
2019-03-15 19:35:08.359 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@e904533)
2019-03-15 19:35:09.359 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@f530f0)
2019-03-15 19:35:09.360 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@f530f0)
2019-03-15 19:35:09.637 13713-13758/? I/Finsky: [510] ias.run(3): Stats for Executor: BlockingExecutor icd@67d797c[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 22]
2019-03-15 19:35:09.638 13713-13758/? I/Finsky: [510] ias.run(3): Stats for Executor: LightweightExecutor icd@58b205[Running, pool size = 3, active threads = 0, queued tasks = 0, completed tasks = 61]
2019-03-15 19:35:10.180 13713-13758/? I/Finsky: [510] ias.run(3): Stats for Executor: bgExecutor icd@df825a[Running, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 64]
2019-03-15 19:35:10.359 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@6ef2669)
2019-03-15 19:35:10.360 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@6ef2669)
2019-03-15 19:35:10.410 1781-1803/? E/storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
2019-03-15 19:35:11.360 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@fbd88ee)
2019-03-15 19:35:11.360 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@fbd88ee)
2019-03-15 19:35:12.360 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@980018f)
2019-03-15 19:35:12.361 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@980018f)
2019-03-15 19:35:13.361 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@f946c1c)
2019-03-15 19:35:13.361 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@f946c1c)
2019-03-15 19:35:14.361 1927-2045/? I/GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@4cac025)
2019-03-15 19:35:14.362 1927-1940/? I/GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@4cac025)
Ohh sorry misread your original post, you're saying you see this on the standard emulator images?
Also to confirm - loading the exact same page in a non-Flutter Android app in a webview(with JS enabled) doesn't crash?
Can you post a snippet of the non Flutter app you used to test this?
confirmed that loading the same page in an android emulator with a webview doesn't crash, but the flutter does.
this is the basic emulator that android studio picks when you create it.
Nexus 5X API 28 (emulator)
but it also happens with the pixel2 emulator.
all are x86 standard emulators.
this is the android example that i hobbled together to get the demo working, but it does work fine minus the spamming the console about wakelock.
package example.gb.webviewexample;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.ButtonBarLayout;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
WebView simpleWebView;
Button loadWebPage, loadFromStaticHtml;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// initiate buttons and a web view
loadFromStaticHtml = (Button) findViewById(R.id.loadFromStaticHtml);
loadFromStaticHtml.setOnClickListener(this);
loadWebPage = (Button) findViewById(R.id.loadWebPage);
loadWebPage.setOnClickListener(this);
simpleWebView = (WebView) findViewById(R.id.simpleWebView);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.loadFromStaticHtml:
// define static html text
String customHtml = "<html><body><h1>Hello, world</h1>" +
"<h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3>" +
"<p>This is a sample paragraph of static HTML In Web view</p>" +
"</body></html>";
simpleWebView.loadData(customHtml, "text/html", "UTF-8"); // load html string data in a web view
break;
case R.id.loadWebPage:
simpleWebView.setWebViewClient(new MyWebViewClient());
String url = "https://www.bible.com/events/577274";
simpleWebView.getSettings().setJavaScriptEnabled(true);
simpleWebView.loadUrl(url); // load a web page in a web view
break;
}
}
private class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">
<Button
android:id="@+id/loadWebPage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:background="#444"
android:text="Load Web Page"
android:textColor="#fff"
android:textSize="14sp"
android:textStyle="bold" />
<Button
android:id="@+id/loadFromStaticHtml"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:background="#444"
android:text="Load Static HTML"
android:textColor="#fff"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<WebView
android:id="@+id/simpleWebView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="20dp"
android:scrollbars="none" />
</LinearLayout>
I encounter this if there is a navigationDelegate
on the web view widget, seems there's something wrong with that. If I remove it, the error doesn't occur.
It's not navigationDelagate for me... I remove it and certain pages still crash.. certain pages work, with or without the navigation delegate.
10:12:11.545 3 info flutter.tools I/WebViewFactory(22578): Loading com.android.chrome version 72.0.3626.121 (code 362612112)
10:12:11.603 4 info flutter.tools D/ (22578): HostConnection::get() New Host Connection established 0xe5e08680, tid 22591
10:12:11.743 5 info flutter.tools I/cr_LibraryLoader(22578): Time to load native libraries: 19 ms (timestamps 2708-2727)
10:12:11.818 6 info flutter.tools I/chromium(22578): [INFO:library_loader_hooks.cc(42)] Chromium logging enabled: level = 0, default verbosity = 0
10:12:11.825 7 info flutter.tools I/cr_LibraryLoader(22578): Expected native library version number "72.0.3626.121", actual native library version number "72.0.3626.121"
10:12:11.825 8 info flutter.tools W/cr_ChildProcLH(22578): Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
10:12:11.885 9 info flutter.tools I/cr_BrowserStartup(22578): Initializing chromium process, singleProcess=false
10:12:12.081 10 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (light greylist, reflection)
10:12:12.081 11 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (light greylist, reflection)
10:12:12.081 12 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
10:12:12.081 13 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
10:12:12.081 14 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
10:12:12.081 15 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
10:12:12.081 16 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
10:12:12.081 17 info flutter.tools W/ntefl.npcmobil(22578): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
10:12:12.134 18 info flutter.tools W/cr_media(22578): Requires BLUETOOTH permission
10:12:12.189 19 info flutter.tools D/ (22578): HostConnection::get() New Host Connection established 0xc565e740, tid 22687
10:12:12.189 20 info flutter.tools E/chromium(22578): [ERROR:gl_surface_egl.cc(336)] eglChooseConfig failed with error EGL_SUCCESS
10:12:12.341 21 info flutter.tools D/EGL_emulation(22578): eglCreateContext: 0xc586d8a0: maj 2 min 0 rcv 2
10:12:12.341 22 info flutter.tools D/EGL_emulation(22578): eglMakeCurrent: 0xc586d8a0: ver 2 0 (tinfo 0xc56f55f0)
10:12:12.341 23 info flutter.tools E/chromium(22578): [ERROR:gl_surface_egl.cc(336)] eglChooseConfig failed with error EGL_SUCCESS
10:12:12.474 24 info flutter.tools D/EGL_emulation(22578): eglMakeCurrent: 0xe430f020: ver 2 0 (tinfo 0xe42f4dc0)
10:12:12.542 25 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:12.549 26 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:12.549 27 info flutter.tools W/VideoCapabilities(22578): Unrecognized profile 4 for video/hevc
10:12:12.659 28 info flutter.tools I/VideoCapabilities(22578): Unsupported profile 4 for video/mp4v-es
10:12:12.677 29 info flutter.tools W/cr_MediaCodecUtil(22578): HW encoder for video/avc is not available on this device.
10:12:12.830 30 info flutter.tools I/flutter (22578): 209.82857142857142
10:12:12.830 31 info flutter.tools I/flutter (22578): -86.39999999999999
10:12:12.830 32 info flutter.tools I/flutter (22578): 0.0
10:12:12.830 33 info flutter.tools I/flutter (22578): 0.0
10:12:12.830 34 info flutter.tools W/cr_CrashFileManager(22578): /data/user/0/org.northpointefl.npcmobile/cache/WebView/Crash Reports does not exist or is not a directory
10:12:12.977 35 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:12.994 36 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:13.331 37 info flutter.tools D/EGL_emulation(22578): eglCreateContext: 0xc6c46940: maj 2 min 0 rcv 2
10:12:13.331 38 info flutter.tools D/EGL_emulation(22578): eglMakeCurrent: 0xc6c46940: ver 2 0 (tinfo 0xc56f55f0)
10:12:13.981 39 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.113 40 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.301 41 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.302 42 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.527 43 info flutter.tools D/ (22578): HostConnection::get() New Host Connection established 0xce7f48c0, tid 22592
10:12:14.527 44 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.527 45 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.527 46 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.527 47 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.654 48 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:14.654 49 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:15.251 50 info runtime.gc collection time 592ms • 90.1MB used of 56.6MB • isolates/1034135984
10:12:15.446 51 info flutter.tools I/chromium(22578): [INFO:CONSOLE(2)] "JQMIGRATE: Migrate is installed, version 1.4.1", source: https://northpointefl.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1 (2)
10:12:15.698 52 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:15.789 53 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:15.979 54 info flutter.tools D/NetworkSecurityConfig(22578): No Network Security Config specified, using platform default
10:12:16.241 55 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:16.403 56 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:16.839 57 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:16.947 58 info flutter.tools E/eglCodecCommon(22578): glUtilsParamSize: unknow param 0x000085b5
10:12:17.276 59 info flutter.tools D/AndroidRuntime(22578): Shutting down VM
10:12:17.276 60 info flutter.tools E/AndroidRuntime(22578): FATAL EXCEPTION: main
10:12:17.276 61 info flutter.tools E/AndroidRuntime(22578): Process: org.northpointefl.npcmobile, PID: 22578
10:12:17.276 62 info flutter.tools E/AndroidRuntime(22578): java.lang.IllegalArgumentException: reasonPhrase can't be empty.
10:12:17.276 63 info flutter.tools E/AndroidRuntime(22578): at android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase(WebResourceResponse.java:139)
10:12:17.276 64 info flutter.tools E/AndroidRuntime(22578): at android.webkit.WebResourceResponse.<init>(WebResourceResponse.java:77)
10:12:17.276 65 info flutter.tools E/AndroidRuntime(22578): at xH.a(PG:286)
10:12:17.276 66 info flutter.tools E/AndroidRuntime(22578): at axu.handleMessage(PG:67)
10:12:17.276 67 info flutter.tools E/AndroidRuntime(22578): at android.os.Handler.dispatchMessage(Handler.java:106)
10:12:17.276 68 info flutter.tools E/AndroidRuntime(22578): at android.os.Looper.loop(Looper.java:193)
10:12:17.276 69 info flutter.tools E/AndroidRuntime(22578): at android.app.ActivityThread.main(ActivityThread.java:6669)
10:12:17.276 70 info flutter.tools E/AndroidRuntime(22578): at java.lang.reflect.Method.invoke(Native Method)
10:12:17.277 71 info flutter.tools E/AndroidRuntime(22578): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
10:12:17.277 72 info flutter.tools E/AndroidRuntime(22578): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
10:12:19.800 73 info flutter.tools I/Process (22578): Sending signal. PID: 22578 SIG: 9
10:12:20.553 74 info flutter.tools Application finished.
i will say using 0.3.3 it doesn't crash for me, but i really need that navigationDelegate feature in 0.3.4
This seems to have started with: https://github.com/flutter/plugins/pull/1236
I confirmed that when using WebViewClientCompat
and loading the provided URL the app crashes, when using WebViewClient
it doesn't.
I'm following up with the WebView team.
Turns out this is a Chromium bug that was recently fixed, tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=925887
The fix should roll out in the coming days with Chrome 73.
Given that this will crash depending on the webview version that's installed on the device, we might want to look at changing flutter_webview
code to not always use WebViewClientCompat.
Reopening, flutter/plugins#1360 improves the issue but doesn't fix it.
Same issue on Mi devices, but works normally on other devices. Also, it works well on Mi devices when I remove navigationDelegate. I really need to use navigationDelegate feature.
Any solution?
Hi @zurie,
I tried to replicate this issue on latest dev channel () and with latest version of webview_flutter
plugin. Although there are logs generated, but didn't see specific exception java.lang.IllegalArgumentException: reasonPhrase can't be empty.
I tested on Pixel 3XL (api 27) emulator.
Can you please confirm if you still experience this issue after upgrading Flutter and with latest webview_flutter
?
Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of 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 related issues.
@darshankawar, Still here. Nexus 5, 6.0.1
• Flutter version 1.20.2
• Framework revision bbfbf1770c (2 weeks ago), 2020-08-13 08:33:09 -0700
• Engine revision 9d5b21729f
• Dart version 2.9.1
Dependencies: webview_flutter: ^0.3.22+1
D/AndroidRuntime(18159): Shutting down VM E/AndroidRuntime(18159): FATAL EXCEPTION: main E/AndroidRuntime(18159): Process: at.atoma.vlinder.dev, PID: 18159 E/AndroidRuntime(18159): java.lang.IllegalArgumentException: reasonPhrase can't be empty. E/AndroidRuntime(18159): at android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase(WebResourceResponse.java:138) E/AndroidRuntime(18159): at android.webkit.WebResourceResponse.<init>(WebResourceResponse.java:76) E/AndroidRuntime(18159): at jY.a(PG:308) E/AndroidRuntime(18159): at zn.handleMessage(PG:67) E/AndroidRuntime(18159): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(18159): at android.os.Looper.loop(Looper.java:148) E/AndroidRuntime(18159): at android.app.ActivityThread.main(ActivityThread.java:5417) E/AndroidRuntime(18159): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(18159): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) E/AndroidRuntime(18159): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
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.
Re-opening, since it shouldn't have been closed; this is still something that could potentially be worked around in the plugin per discussion above.
Labelling as a P6 though; we don't have plans to work on this given that it's a fixed bug in the Android webview, but if someone wants to contribute a fix to handle devices that are using old versions of webview we would review it.
HTTP2 doesn't have Reason-Phrase. This will break WebResourceResponse. It is WebResourceResponse's bug. https://bugs.chromium.org/p/chromium/issues/detail?id=925887
To work around this bug, we probably can supply a non empty string like " ".
Pretty much any webpage I try to goto craps out with wanting glUtilsParamSize?? maybe thats unrelated but its preventing me from releasing this update to the android play store.
or its
java.lang.IllegalArgumentException: reasonPhrase can't be empty.
I am using pretty much the built in Example from the /example folder
Android 26 Emulator and Android 28 emulators, If the page is simple enough it won't crash but still spam the logs but if its more complex (think images + jquery) it craps out.
D/ (20167): HostConnection::get() New Host Connection established 0xc3d7dd40, tid 20181 I/flutter (20167): 209.82857142857142 I/flutter (20167): -86.39999999999999 I/flutter (20167): 0.0 I/flutter (20167): 0.0 D/EGL_emulation(20167): eglMakeCurrent: 0xeb9c6a60: ver 2 0 (tinfo 0xd00ff010) E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 I/chromium(20167): [INFO:CONSOLE(2)] "JQMIGRATE: Migrate is installed, version 1.4.1", source: https://example.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1 (2) E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 E/eglCodecCommon(20167): glUtilsParamSize: unknow param 0x000085b5 D/AndroidRuntime(20167): Shutting down VM E/AndroidRuntime(20167): FATAL EXCEPTION: main E/AndroidRuntime(20167): Process: org.mycompany.myflutterapp, PID: 20167 E/AndroidRuntime(20167): java.lang.IllegalArgumentException: reasonPhrase can't be empty. E/AndroidRuntime(20167): at android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase(WebResourceResponse.java:139) E/AndroidRuntime(20167): at android.webkit.WebResourceResponse.<init>(WebResourceResponse.java:77) E/AndroidRuntime(20167): at xl.a(PG:292) E/AndroidRuntime(20167): at afG.handleMessage(PG:67) E/AndroidRuntime(20167): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(20167): at android.os.Looper.loop(Looper.java:193) E/AndroidRuntime(20167): at android.app.ActivityThread.main(ActivityThread.java:6669) E/AndroidRuntime(20167): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(20167): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) E/AndroidRuntime(20167): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) I/Process (20167): Sending signal. PID: 20167 SIG: 9 Lost connection to device.