Ionic Cloud Deploy Service always downgrades Production to old Dev Version



I am using Ionic Cloud to build my packages in PROD mode. I noticed that for every cloud package I build with this command: ionic package build android --prod --release --profile prod

It ALSO puts a Deploy Snapshot into Ionic Deploy.

This means, that as soon as user downloads the app from the AppStore, it prompts them that there is a new version and downloads a DEV version of the build and downgrades them. The Dev version is NOT AOT/minified and uses the Dev variables (e.g. localhost) so it renders the app unusable.

My deployment service code is set to only look in the production channel (and a toast message confirms that this is the channel it is watching) - however it finds Dev channel snapshots and deploys them.

For now I have had to remove this functinoality from my app and do APK upgrades. Browsing the forum, it seems like quite a common problem.

Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.2.5
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.0
Xcode version: Not installed

and the code:


public isNewVersionAvailable(): Promise<boolean> {"DeployService - isNewVersionAvailable");
    if ('cordova')) {"Canal: " +;
        return this.deploy.check();
    else {"DeployService: Running on web - cannot check for new versions...");
        return Promise.resolve(false);

public checkForNewVersionUpdateAndAsk(): void {"checkForNewVersionUpdateAndAsk");
    if ('cordova')) {
            .then((snapshotAvailable: boolean) => {
                if (snapshotAvailable) {
            .catch(() => {
                //TODO: What to do here? Should we alert a service?
                this.loggerService.error("Error: Could not check for new versions - please try again or contact Support");
                this.toastService.showAndClose("Error: No fue posible buscar nuevas versiones - Por favor inténtalo más tarde o contacta a soporte");
    else {"DeployService: Running on web - cannot check for new versions...");

public downloadAndInstall(): any {
    if ('cordova')) {
            .then(() => {
                    .then(() => {
            .catch(() => {
                this.loggerService.error("Error: No es posible iniciar la descarga - please try again or contact Support");
                this.toastService.showAndClose("Error: No es posible iniciar la descarga - Por favor inténtalo más tarde o contacta a soporte");
    else {"DeployService: Running on web - cannot download...");

How to use Ionic Cloud Deploy on Ionic 2
Deploys outdated App version


  1. You are using Ionic (Cloud) Build.
  2. This uploads the html file to Ionic (Cloud) Deploy as “Ionic Package Upload: upload”.
  3. This upload is then “deployed” (activated) and offered in your app by the Ionic Cloud Deploy code although it is the wrong deploy channel.



Not exactly - I have narrowed down the problem a bit more and come up with a way to solve it.

Firstly- there seems to be 2 different problems. If I have a DEV channel snapshot marked as Active, this will overwrite a PRODUCTION channel build - it is NOT respecting the Active Channel in the deploy code.

The second problem is when the new snapshot is immediately overridden. I found the Dev snapshot build that was marked as active and set the version to 99.99.99 - now it does not overwrite it.

I am now careful not to do any DEV snapshots and can handle it manually , but it seems a bit buggy.


Some people are using Ionic Deploy… I think someone would have reported it if a DEV channel upload/snapshot being activated would cause the PRODUCTION channel to cause this DEV version being downloaded (That’s what you are saying, right?).

Are you sure your app is set up correctly?


Yes, definitely.

I have different versions in environment files (like 1.0.0p and 1.0.0d) as well as all my GA and Auth0 keys are different. After a prod upgrade I do a Toast message on the active Deploy channel and it is “production” (the same as the tag in Ionic, and also supposed to be the fall back IF the specified channel is not found).

The snapshot that overwrites it is the one marked as Active in the DEV channel.


A post was split to a new topic: What version do deploy via Ionic Deploy?