Failed to load resource: net::ERR_FILE_NOT_FOUND ionic error

25,023

Solution 1

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

Solution 2

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

Solution 3

See link.

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

Solution 4

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

Share:
25,023
Admin
Author by

Admin

Updated on September 06, 2020

Comments

  • Admin
    Admin over 3 years

    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