Couldn't load url with WebView : ERR_CACHE_MISS

4.6k views Asked by At

I am trying to load "https://facebook.com/" with a WebView but it says the webpage couldn't be loaded and the problem is ERR_CACHE_MISS.

Problem screenshot

The code that I am using is widely-used one. I don't know why there is such problem.

webView.setVerticalScrollBarEnabled(true);
webView.setHorizontalScrollBarEnabled(false);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webView.loadUrl("https://facebook.com");

Android API: 22

Internet permission has been granted in Manifest.

EDIT: (Related logs are added : The initial release for Android 5.0 includes a version of Chromium for WebView based on the Chromium M37 release. So, I've added chromium logs. Any other log related to webview doesn't exist.)

V/WebViewChromiumFactoryProvider﹕ Binding Chromium to main looper Looper (main, tid 1) {3c06d3b9}
I/chromium﹕ [INFO:library_loader_hooks.cc(104)] Chromium logging enabled: level = 0, default verbosity = 0
W/chromium﹕ [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
I/chromium﹕ [INFO:aw_browser_main_parts.cc(65)] Load from apk succesful, fd=38 off=46872 len=3037
I/chromium﹕ [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:39 off:230172 len:1089587
W/chromium﹕ [WARNING:data_reduction_proxy_settings.cc(331)] SPDY proxy OFF at startup
I/chromium﹕ [INFO:CONSOLE(12)] "Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png", source: data:text/html,chromewebdata (12)
1

There are 1 answers

0
Hamed Jaliliani On

I solved flutter ERR_CACHE_MISS by put internet permission TAG in AndoirdManifest.xml :

<uses-permission android:name="android.permission.INTERNET"/>