Cordova : HCP not working

I am working on a cordova application with Meteor (2.0) and Vue (akryum:vue-component).

HCP does not work. I have the following message:

MeteorWebApp: Skipping downloading current version: 8f3cc077932d6822b49e800eb1b4ca35e810da9e on adblog ouput.

The __meteor_runtime_config__.autoupdateVersionCordova is undefined on client side.

the __meteor_runtime_config__ object is the following:

{ 
DDP_DEFAULT_CONNECTION_URL: "http://192.168.1.98:3000/",
ROOT_URL: "http://192.168.1.98:3000/",
ROOT_URL_PATH_PREFIX: "",
appId: "yewdeqmy507.uzkpzqq3bjx",
autoupdate: {
  versions: {
    web.cordova: {
      version: "8f3cc077932d6822b49e800eb1b4ca35e810da9e",
      versionNonRefreshable: "c74bbbc629b8d147ac7f4582fd324d1d74c535f8",
      versionRefreshable: "0733ea0d8571037293c7f6d348ac1cf74c91349b",
     },
   }
 }
gitCommitHash: "d158e51ec0637c6dcb6bebb36125fabcc7f5adee",
meteorEnv: {NODE_ENV: "development", TEST_METADATA: "{}"},
meteorRelease: "METEOR@2.0",
}

Thanks

Just to add, we rolled back from Meteor 2.0 to the previous version because HCP for our Cordova App wasn’t working anymore too.

We didn’t have time to investigate yet, but normally our HCP works without issues, we’re hardcore setting METEOR_CORDOVA_COMPAT_VERSION_ANDROID && METEOR_CORDOVA_COMPAT_VERSION_IOS to the same fixed version for a LOOOONG time now :slight_smile:

Just an update. Currently, it works. I do not know exactly how it has been solved…

I’ve run into a similar issue w/Electron and meteor-deskop since it uses a similar HCP mechanism. I found this bit in the docs that seems to imply this is intentional since Meteor updated to a new major version:

Override compatability versions

Did the app suddenly stop getting new code after you updated meteor, or you changed plugins?

The client probably logs: Skipping downloading new version because the Cordova platform version or plugin versions have changed and are potentially incompatible

Meteor, Cordova and plugins cannot be updated through Hot Code Push. So Meteor by default disables Hot Code Push to app versions that have different versions than the server. This avoids crashing a user’s app, for example, when new JS calls a plugin that his app version doesn’t yet have.

You can override this behavior. Just make sure you deal with potentially incompatible versions in your JS instead.

1 Like

It stopped again to work yesterday. This time took some times to try finding the issue.

So, by removing the zodern:standard-minifier-js package and put back the standard-minifier-js package, HCP works again. @zodern any idea why ?

There is an open issue for this: hiding sourcemaps causes Cordova HCP to fail · Issue #23 · zodern/minify-js-sourcemaps · GitHub. Cordova tries to download the source maps but the package blocks it. I’m not familiar with cordova, so I would appreciate any suggestions on how this could be fixed. The fixes I’ve considered won’t work since cordova checks the hash of the downloaded file’s content.

Thanks @zodern . I miss this opened issue. I wiil try to look at it.