Error when implementing Ionic Deploy


#1

Ionic Version 1.3.1
ionc cloud Version 0.16.0
iOS 10.3.1

$ionicDeploy.check().then(function(response) {
            // response will be true/false
            if (response) {

                $ionicLoading.show({
                    template: '<ion-spinner icon="ripple" class="spinner-energized"></ion-spinner><br/>Aguarde, estamos atualizando seu app.'
                });

                // Download the updates
                $ionicDeploy.download().then(function() {
                    // Extract the updates
                    $ionicDeploy.extract().then(function() {
                        // Load the updated version
                        $ionicDeploy.load();
                    }, function(error) {
                        // Error extracting
                    }, function(progress) {
                        // Do something with the zip extraction progress
                        console.log(progress);
                    });
                }, function(error) {
                    // Error downloading the updates
                }, function(progress) {
                    // Do something with the download progress
                    console.log(progress);
                });
            }
        }, function(error) {
            // Error checking for updates
        });

the error:

2017-04-26 17:04:06.053043-0300 Otimicar[2765:1209571] version is: 0.0.1
2017-04-26 17:04:06.053159-0300 Otimicar[2765:1209571] uuid is:
2017-04-26 17:04:06.053184-0300 Otimicar[2765:1209571] channel is: production
2017-04-26 17:04:06.053256-0300 Otimicar[2765:1209571] JSON Error: (null)
2017-04-26 17:04:06.053374-0300 Otimicar[2765:1209571] Response: (null)
2017-04-26 17:04:06.053533-0300 Otimicar[2765:1209571] JSON: {
    data =     {
        available = 1;
        compatible = 1;
        metadata =         {
        };
        snapshot = "879f90da-2ab9-11e7-b4a6-bac73bbac515";
        url = "https://api.ionic.io/deploy/snapshots/879f90da-2ab9-11e7-b4a6-bac73bbac515/download?app_id=b58175d0";
    };
    meta =     {
        "request_id" = "f1f25b56-589f-456d-c525-fb3ff0d9cf33";
        status = 200;
        version = "2.0.0-beta.0";
    };
}
2017-04-26 17:04:06.053569-0300 Otimicar[2765:1209571] compatible: True
2017-04-26 17:04:06.053617-0300 Otimicar[2765:1209571] available: True
2017-04-26 17:04:06.053690-0300 Otimicar[2765:1209571] update uuid: 879f90da-2ab9-11e7-b4a6-bac73bbac515
2017-04-26 17:04:06.054047-0300 Otimicar[2765:1209571] update is true
2017-04-26 17:04:06.179360-0300 Otimicar[2765:1209006] Error in Success callbackId: IonicDeploy1474655124 : TypeError: undefined is not an object (evaluating 'this.infofn.apply')

#2

Thanks @Sujan12, but even checking the reponse, the error persist. I already had tested this…


#3

Huh did I reply to this? Where did my reply go? Do you still see it: What did I write?


#4

No you didn’t… You had edited my post, whiting the “if (response)” part.

But You saw that my error was this:

Error in Success callbackId: IonicDeploy …


#5

Ah I fixed the code formatting as it didn’t work 100%.

Can you provide your ionic info and content of package.json please?

Also please add some console output in the front of download(), extract() and load() so we know how far you actually get befor it crashes.


#6

Yes,

ionic info:

Your system information:

Cordova CLI: 6.5.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v6.6.0
Xcode version: Xcode 8.3.2 Build version 8E2002

package.json

{
  "name": "izieapp",
  "version": "1.1.1",
  "description": "izieApp: An Ionic project",
  "dependencies": {
    "@ionic/cloud": "^0.16.0",
    "clean-css": "^4.0.9",
    "gulp": "^3.5.6",
    "gulp-concat": "^2.2.0",
    "gulp-jade": "^1.1.0",
    "gulp-minify-css": "^0.3.0",
    "gulp-rename": "^1.2.0",
    "gulp-sass": "^2.0.4",
    "lodash": "^4.17.4",
    "lodash.assign": "^4.2.0",
    "ng-annotate": "^1.2.1",
    "uglify-js": "^2.8.12"
  },
  "devDependencies": {
    "async": "^2.0.1",
    "bower": "^1.3.3",
    "cordova-uglify": "^0.2.4",
    "gulp-angular-templatecache": "1.9.1",
    "gulp-useref": "^3.1.0",
    "gulp-util": "^2.2.14",
    "jshint": "^2.9.3",
    "mv": "^2.1.1",
    "shelljs": "^0.3.0"
  },
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard",
    "cordova-plugin-file-transfer",
    "helpshift-support-plugin",
    {
      "locator": "https://github.com/katzer/cordova-plugin-badge.git",
      "id": "cordova-plugin-badge"
    },
    {
      "variables": {
        "SENDER_ID": "427005787833"
      },
      "locator": "phonegap-plugin-push"
    },
    "cordova-plugin-inappbrowser",
    "cordova-plugin-camera",
    "cordova-plugin-geolocation",
    "cordova-plugin-geolocation@~2.4.2",
    "phonegap-plugin-push"
  ],
  "cordovaPlatforms": [
    "android",
    "ios"
  ]
}

And I can’t log anything, the error that I already had posted here is what I got.


#7

Why is that? Right now I don’t understand what is actually triggering the error. Seems a bit like this is in some Ionic Deploy code, but I have no way to find out where exactly without knowing how far your custom code is executed.