I run into this issue seemingly at random. Sometimes the app loads, sometimes it does not.
I’m running Ionic v4-b11 and Cordova Android 7.1.1. I’ve tried putting <script src="cordova.js"></script> into my index.html page, but then the console notes that I already have it installed. So it’s either not installed, or double installed.
Yes, this is an Ionic 4 app. I didn’t think I should need to add a reference to cordova.js, but that’s definitely what the console.log is telling me the problem is.
For a bit more detail, my app is loading the main page it should open to, but none of the plugins are working so I can’t retrieve files, show the statusBar, or do anything other than HTML and JS code.
Final thought, so in src/index.html you didn’t added the reference manually right (which I suppose is the correct way with v4)? so after having build your platform ionic cordova build android do you find any cordova.hash.js references in your ./app/src/main/assets/www/index.html ?
In src/index.html, I’ve tried adding the <script> reference, but the console tells me that Cordova.js is already included. When I remove the <script> reference, the console tells me that Cordova.js is not included.
It seems to be a case of double-or-nothing, and both have the issue of plugins occasionally not loading.
It appears I was using version 1.0.0, so I changed it to the v1.0.8 noted in the link you’ve included. Unfortunately the issue remains.
The strangest thing is that it’s inconsistent. Sometimes it says it can’t find the script tag, sometimes it does find it. I don’t change anything in the way I’m building or running the code - just the same “ionic cordova run android --prod” every time.
My gosh I was really hopeful on that last post sorry no more idea right now, maybe follow the issue anyway, at some point maybe someone will post something interesting
For anyone else with this problem, I’ve worked with Ionic Support and they’ve confirmed that this “Could not find…” error is meaningless, and it won’t actually affect your app. If you’re running into errors and see this warning, it’s a red herring and the problem lies elsewhere.
I have the same issue. It seems like all the cordova plugins load before cordova.js does. I found this out in index.html from google chrome console. Anyone has thought on this?
I think I solved the issue by checking the plugin list and adding each one in app.module.js providers. I was missing two plugin intializations there, by adding in app.module.js i solved the issue. May be it might help someone else as well