nordnet/cordova-hot-code-push-cli

Hot code installs an older version

Closed this issue · 4 comments

Hello,

I have an issue, created a new release, ran
cordova-hcp build
cordova build android -- chcp-production --release
installed apk
on the remote app server the chcp json is way older

{
  "content_url": "x",
  "min_native_interface": 7,
  "android_identifier": "x",
  "apple_identifier": "1089624220",
  "update": "now",
  "release": "2016.06.11-17.39.13"
}

than the version generated and installed:

{
  "content_url": "x",
  "min_native_interface": 7,
  "android_identifier": "x",
  "apple_identifier": "1089624220",
  "update": "now",
  "release": "2016.08.06-11.57.19"
}

But it still downloads the older one. Is there a way I can check that during compilation it bundles the local chcp.json properly? Or can I debug somehow that what is the locally stored version and why it updates to the older?

Thanks.

And additionally (it might be a different issue) it claims the following:

Install failed Object {code: -7, description: "Can't copy files from previous release to the new release"}

How can I debug this issue?

Thanks.

Ok it seems for the olderversion, it really only checks string difference and does NOT compares dates.

Yes, it doesn't. For now they are compared as strings. There is a plan to use instead of the date - unix timestamp, and define if we want to compare values - nordnet/cordova-hot-code-push#161