2
votes

I have install whitelist plugin and in config.xml

<access origin="*"/>
<allow-navigation href="*" />

but

i am getting error

Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/ion-autocomplete/dist/ion-autocomplete.css Failed to load   resource: net::ERR_FILE_NOT_FOUND
file:///css/ionic.app.css Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/ionic/js/ionic.bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/ngCordova/dist/ng-cordova.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///cordova.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/moment/moment.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/angular-bootstrap/ui-bootstrap-tpls.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/x2js/xml2json.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///lib/ionic-ajax-interceptor/dist/ionic-ajax-interceptor.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND

It works fine when i test in browser but on testing on mobile device i am getting error above.

I have gone through all the solution available but can fix it at the moment

Thanks

5

5 Answers

5
votes

Try adding all of these

<access origin="*"/>
<access origin="tel:*" launch-external="yes"/>
<allow-navigation href="*"/>
<allow-navigation href="http://*/*"/>
<allow-navigation href="https://*/*"/>
<allow-navigation href="data:*"/>
<allow-intent href="*"/>
<access origin="*"/>

EDIT:

To your config.xml file

3
votes

i was facing the same error and i fixed it by doing these 2 simple steps

  1. ionic cordova platform remove android
  2. ionic cordova platform add android

and after this just run the command ionic cordova run android and its work like a charm

2
votes

See link.

remove <base href="/"> from your index.html

1
votes

I am getting same error,In my case my IP address was wrong.Check your if you are using IP address in your code.

0
votes

In my case, I only changed in index.html

<base href="/" />

to

<base href="." />