"net::ERR_CACHE_MISS" when loading an external URL in Cordova
Solution 1
Oh damn... sometimes you just need to step back... Beginner's mistake: it is android.permission. and not android.permissions. Resolved!
Solution 2
All i had to do was:
cordova platform remove android
cordova platform add android
and the "net::ERR_CACHE_MISS" error disappeared. I have no idea what the reason was.
Solution 3
The used syntax is wrong.
Your used:
<uses-permission android:name="android.permissions.INTERNET" />
<uses-permission android:name="android.permissions.NETWORK_ACCESS" />
<uses-permission android:name="android.permissions.ACCESS_NETWORK_STATE" />
Correct:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NETWORK_ACCESS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Name "android.permission" is singular.
Solution 4
net::ERR_CACHE_MISS is not a bad error, it simply means the page loaded has not been cached, if you go to a cached page the error should not show up. Most pages now will show this error, and while annoying it shouldn't do any damage to your application.
Solution 5
solved by adding internet permission in manifesto file
<uses-permission android:name="android.permission.INTERNET" />
czery
Updated on July 12, 2021Comments
-
czery almost 3 years
I am getting crazy about this. I have a pretty basic Cordova (3.5.0) app and want to load an external URL. The only thing I am doing is loading jQuery (locally) and executing this on button click:
$.ajax({ dataType:'html', url:'http://www.google.com', success:function(data) { $('#ajax').html($(data).children()); } });
Everytime on loading my app fires this error:
GET http://www.google.com/ net::ERR_CACHE_MISS jquery.min.js:4 send jquery.min.js:4 m.extend.ajax jquery.min.js:4 (anonymous function) index.html:68 m.event.dispatch jquery.min.js:3 r.handle jquery.min.js:3
All permissions are properly set in the AndroidManifest.xml
<uses-permission android:name="android.permissions.INTERNET" /> <uses-permission android:name="android.permissions.NETWORK_ACCESS" /> <uses-permission android:name="android.permissions.ACCESS_NETWORK_STATE" />
Does anyone of you had a similar issue? What does net::ERR_CACHE_MISS means?
-
David M. over 7 yearsYou also need to make sure the
android
namespace is declared in theconfig.xml
file:xmlns:android="http://schemas.android.com/apk/res/android"
-
JoshuaDavid about 7 yearsThis solution worked for me. In my case, the initial problem was caused by removing a cordova plugin.
-
Fullhdpixel over 6 yearsomg, this is the most infuriating kind of shit to deal with when developing. THANKS!!!!!
-
Flyingkiwi almost 4 yearsI think you meant Android manifest, but you were absolutely correct in my case.