Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Error -7 after native update #229

Closed
Jambon28 opened this issue Sep 24, 2016 · 4 comments
Closed

Error -7 after native update #229

Jambon28 opened this issue Sep 24, 2016 · 4 comments

Comments

@Jambon28
Copy link

Hi, and congrats for this great plugin !

Problem

After installing a native update (in config.xml : same id with new version and android-versionCode attributes), hcp returns error -7 : Can't copy files from previous release to the new release.

Steps to reproduce
  1. install a native version 1.0 of an app : version="1.0.0" and android-versionCode="10"
  2. make hcp update its code version
  3. close the app
  4. compile a new version 1.1 : same id, version="1.1.0" and android-versionCode="11"
  5. install this new version 1.1 on the device :
    => hcp detects correct new native version (1.1)
    => hcp detects current and old hcp releases ("current web version" and "previous web version"). Is this normal ? I understand it should not, as we have a new native version
    => hcp downloads a new code version (this is ok)
    => hcp fails to install the new code version : error -7 "can't copy files from previous release to the new release"
System info

Platform : Android 4.4.2
Cordova 6.3
HCP lastest (just built with git url)
Built with PhonegapBuild

This seems to be a bug, as native version update (through appstore) is impossible. The only way is to uninstall the app before installing the new native version.

Am i wrong somewhere ?

thanks for you help

@Jambon28
Copy link
Author

Hi again,

After some more tests, it seems that this issue was because hcp code update for v1.1 was the same as hcp code update for v1.0 (same content_url).

With different code updates (content_url), it is ok.

Anyway it should not happen (as i understand the update workflow). It may be still a bug, but a minor bug.

For instance, if someone compiles a new native version for a minor plugin update, the whole cordova plugins JS API could be the same, and the JS code (hcp code) could stay exactly the same.

@nikDemyankov
Copy link
Member

Hi,

There is a PR #225 with a fix for this problem. Although, I think the problem is in some other place. Will investigate and get back to you.

@nikDemyankov
Copy link
Member

Also, PR #231 . Same thing.

nikDemyankov added a commit that referenced this issue Sep 27, 2016
…preferences when app is updated via store. Needs more cleanup.

#229
@nikDemyankov nikDemyankov added this to the v1.5.2 milestone Sep 27, 2016
@nikDemyankov
Copy link
Member

Fix released in v1.5.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants