Search code examples
androidnode.jscordovanpmaerogear

Failed to load resource: net::ERR_FILE_NOT_FOUND with Cordova


I am following the aerogear tutorial on https://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/.

I have gone through this several times now and continue to have the same issue.

When deploying to Genymotion, and debugging using chrome, I see the following error:

file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear-push.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear.ajax.js Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1431 Uncaught Error: Module aerogear-cordova-push.AeroGear.ajax does not exist.
cordova.js:1185 deviceready has not fired after 5 seconds.
cordova.js:1178 Channel not fired: onPluginsReady
cordova.js:1178 Channel not fired: onCordovaReady

Observations

I notice that, when viewing in the Chrome inspector, that the plugin files are empty plugin files are empty, yet in my local project there is contents for all the plugin files.

Things I have tried

  • Removing and re-adding aerogear plugs
  • Doing a factory reset of the Genymotion vm.
  • Uninstall and reinstall node using instructions on Installing NodeJS without sudo in Ubuntu
  • Reinstall cordova
  • Reinstall genymotion
  • Restart

Details

  • Node version v5.4.1
  • Ubuntu version 15.10
  • Cordova 5.4.1
  • Android 5.1

Does anyone know how to fix this?

Thanks


Solution

  • I cannot say for sure why fixed it, but I suspect it was due to either:

    • permissions
    • corrupted dependencies

    After reinstalling and re-setting permissions - and doing a restart - it worked correctly.