So, if the Deploy update method is set to background, once you test the app for the first time, it won’t be downloading a snapshot at first. Have you tried closing and reopening the app and double checking if it’s downloading a snapshot?
I’ve been building and rebuilding a lot and may have found the cause… but not the solution yet.
Currently, the issue seems to lie within the “scripts” portion of the package.json
file.
When I am pushing a new commit to the Deploy service, my package.json scripts looked like this:
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build --prod",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
Notice the --prod
flag under the build command.
When I remove that --prod
flag so the scripts look like this:
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build --prod",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
The Deploy snapshot works. I don’t get a white screen and the app is updated.
Not sure why yet… still working with Ionic Support to figure that out. May have more answers on Monday.
Note:
When build a native app that doesn’t download a snapshot using the command ionic cordova build android --prod --release
, the app works fine… it’s only when the Deploy plugin downloads a snapshot that was built with the --prod
flag do I get that white screen and the errors in the app console.