Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting ERR_CACHE_MISS on window.open


I'm using PhoneGap (cordova 2.9.1, android 4.4.2) and trying to open an external URL in the current view:

document.addEventListener("deviceready", function(){     window.open('http://www.google.com', '_self')  }); 

But I'm receiving the following error:

net::ERR_CACHE_MISS (http://www.google.com)

Any ideas ?

like image 328
Asaf Avatar asked Mar 10 '14 13:03

Asaf


People also ask

What causes ERR_CACHE_MISS?

If you're a developer, you may encounter this message if you're using the wrong codes to test an application or website, either on Android or another OS. As a user, you could encounter it when trying to access just about any website, even highly-popular ones such as Facebook.

How do I fix err cache miss?

The ERR_CACHE_MISS error is usually caused by a problem with the caching system, outdated extensions, or the wrong browser configuration. Usually, the issue is with your own browser or with a third party extension. As such, updating or resetting your browser or disabling extensions will usually fix the problem.


1 Answers

The issue ended up being a missing permission, namely, INTERNET permission.
For some reason I was under the impression that ACCESS_NETWORK_STATE is enough.
To solve the issue, just add this to AndroidManifest.xml :

<uses-permission android:name="android.permission.INTERNET" /> 
like image 129
Asaf Avatar answered Oct 11 '22 12:10

Asaf