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

Fix error LOCAL_VERSION_OF_APPLICATION_CONFIG_NOT_FOUND on application update (via the store) #279

Closed
wants to merge 1 commit into from

Conversation

vouillon
Copy link

@vouillon vouillon commented Mar 9, 2017

In function installWwwFolder, the www folder is copied from the asset file by:

AssetsHelper.copyAssetDirectoryToAppDirectory(cordova.getActivity().getApplicationContex
t(), WWW_FOLDER, fileStructure.getWwwFolder());

So, we have to make sure that fileStructure is updated to return the correct folder, corresponding to the current release version, before that. Otherwise, chcp.json will not be found in the expected folder later on and we get an error LOCAL_VERSION_OF_APPLICATION_CONFIG_NOT_FOUND.

@nikDemyankov
Copy link
Member

Good catch, thank you!
Although it should be done a bit different, but the idea is correct. The problem right now is that you should not switch to the new release folder, because wile copying is done - JS side might request some stuff from the plugin. And during the copy we are working with the old release folder. But you are right - we need to provide the correct target folder url.

@rollsroyc3
Copy link

rollsroyc3 commented Apr 18, 2017

I also get somewhat the same issue, when I am testing locally on a build that has already been installed (and copied over files), when I launch the app for a second time I get the error: Failed to load current application config -9. Then in my listeners I see the events chcp_beforeAssetsInstalledOnExternalStorage and chcp_assetsInstalledOnExternalStorage fire, not sure what is going on here though.

I tried your PR but it did not seem to help, any suggestions? @nikDemyankov @vouillon ?

@KevinMVTransit
Copy link

Has anyone come up with a fix for this.
When I update an existing app, I get 'LOCAL_VERSION_OF_APPLICATION_CONFIG_NOT_FOUND '

@chriswep
Copy link

this pull request fixes the issue i am having:

  • local non-release version installed
  • install new app container (app store / Xcode) with out-of-date www folder
    => fetchUpdate() produces the error mentioned here
    => hard-restart of app "fixes" the problem

@vouillon am right that you manually applied another pull request in this one - i think this causes the conflict in scripts/lib/iosWKWebViewEngineSupport.js

@nikDemyankov first of all: thank you for this plugin, i am using this successfully on a ionic project. what is the general state of this project? Do you have plans maintaining this mid/long term or would you encourage continueing it on a fork or switching to another solution? I did some test with newest cordova & cordova-android versions which failed. Also there will probably be issues with the new Ionic capacitor native runtime.

dcrousset pushed a commit to dcrousset/cordova-hot-code-push that referenced this pull request Apr 24, 2018
dcrousset pushed a commit to dcrousset/cordova-hot-code-push that referenced this pull request May 1, 2018
fix : nordnet#279
property 'newInstall' on fetchUpdate callback to detect new installation
@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #371 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants