I have just implement the new Ionic Pro deploy functionality.
On iOS it works as expected. On android it fails in production and debug. I have tried it on 2 different android devices.
Here is my code:
try {
const haveUpdate = await Pro.deploy.check();
if (haveUpdate){
downloadProgress = ‘Downloading…’;
console.log(‘downloading’);
await Pro.deploy.download((progress) => {
downloadProgress = `Downloading: ${progress}%`;
});
console.log('downloaded');
await Pro.deploy.extract((progress) => {
downloadProgress = `Extracting: ${progress}%`;
console.log(progress);
});
console.log('extracted');
downloadProgress = `Redirecting - please wait`;
await Pro.deploy.redirect();
}
} catch (err) {
downloadProgress = We have encountered an error. Please restart this app and try again.
// We encountered an error.
// Here’s how we would log it to Ionic Pro Monitoring while also catching:
// Pro.monitoring.exception(err);
}
in the Pro.deploy.extract method, progress hangs at 94%.
Strangely, the console.log call that outputs ‘extracted’ is logged between the output from 74 and 75% extracted.
await Pro.deploy.redirect() is never called.
It also fails without the console log statements.
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.3.0 browser 5.0.3 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.0.2
ios-deploy : 1.9.2
ios-sim : 6.0.0
Node : v8.9.1
npm : 5.5.1
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /Users/chrisdelambert/Library/Android/sdk
Misc:
backend : pro