When I run ionic cordova run android the app loads on my device, and when the splash screen fades away I get a blank white screen. Upon inspecting it with Chrome dev tools, I see the following errors:
cordova.js Failed to load resource: net::ERR_FILE_NOT_FOUND
16:32:44.195 main.css Failed to load resource: net::ERR_FILE_NOT_FOUND
16:32:44.195 vendor.js Failed to load resource: net::ERR_FILE_NOT_FOUND
16:32:44.195 polyfills.js Failed to load resource: net::ERR_FILE_NOT_FOUND
16:32:44.196 main.js Failed to load resource: net::ERR_FILE_NOT_FOUND
16:32:44.238 /assets/icon/favicon.ico Failed to load resource: net::ERR_FILE_NOT_FOUND
I’ve actually already deployed this app to the play store, so I know it was working, but I am not sure why it isn’t now. I haven’t edited index.html to change the paths. I also tried ionic cordova platform rm android and ionic cordova platform add android but I am still getting those errors.
It works fine when I run ionic serve or when I run ionic cordova run android -lcs
Here is my ionic info:
cli packages: (/Applications/MAMP/htdocs/sparkles-android/node_modules)
@ionic/cli-utils : 1.17.0
ionic (Ionic CLI) : 3.17.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.4
Cordova Platforms : android 6.3.0 browser 5.0.1
Ionic Framework : ionic-angular 3.9.2
System:
Node : v6.12.2
npm : 5.2.0
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Ok, so I did that and it works fine when I run ionic cordova run android --prod and test it on my phone. However after releasing it through the play store, for some reason some phones (not all) get a white screen the second time they open it.
So they download the app, use it, and close it. Then when they reopen it, the splash screen fades away and then there is a white screen that will not go away. Any thoughts?
@juniethreatt did you ever figure this out? I’m running into the same issue.
It only occurs when using the --release flag. Frustrating, as that inherently disables debugging (re-enabling debugging in the manifest makes it works but then of course google play won’t allow it).
It was a plugin error. Blew away my platform folder and my plugin folder. Started working afterward.
For future travelers: Add an alert on device.ready. If it doesn’t fire (in this case the second time the app was open) then it’s probably a plugin issue.