Code push -- unable to compute hash for package

Viewed 196

Description

I'm using Ionic 2's Ionic native code push library. When I deploy the application using codepush, the app (on Android) downloads the update but fails on install. What generally is the cause of an issue of being "unable to compute hash for package"?

Here are my logs:

[CodePush] Installing update
codePushUtil.js:36 [CodePush] Applying diff update
codePushUtil.js:36 [CodePush] Verifying hash for folder path: /codepush/deploy/versions/80577a164814d7e257b6e0cfac86890ee06b51617eb56d27d4fa8baf4af1a785/
codePushUtil.js:40 [CodePush]  Unable to compute hash for package: An error occurred when trying to get the hash of the binary contents. invalid directory path /data/user/0/com.outplayed.tycho/files/codepush/deploy/versions/80577a164814d7e257b6e0cfac86890ee06b51617eb56d27d4fa8baf4af1a785/www

This is the code I have in my main ts file:

 constructor(public plt: Platform, private codePush: CodePush) {
    if (this.plt.is('cordova')) {
      // Don't run codepush in browser.
      this.plt.ready().then((readySource) => {
        const downloadProgress = (progress) => { console.log(`Downloaded ${progress.receivedBytes} of ${progress.totalBytes}`); }
        this.codePush.sync({}, downloadProgress).subscribe((syncStatus) => console.log(syncStatus));
      });
    }
  }

Additional Information

  • cordova-plugin-code-push version: 1.10.0-beta
  • Cordova version: Cordova android 6.3.0
0 Answers
Related