You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
I'm using CodePush for my cordova project. I see this message in the console:
The update contents failed the data integrity check
The weird thing is that it is not happening to all users, only 3% of my users are getting problem and I cannot replicate it locally (it happened to me too but just 5, 6 times of about 500 times I did release). Once I've got this issue, the app is unable to get any new update, it gets stuck at the old version forever even when I release a new version.
I check out the source and found it was due to: computedHash !== newUpdateHash
if (computedHash !== newUpdateHash) {
errorCallback(new Error("The update contents failed the data integrity check."));
return;
}
I incline to the computed hash at client because it works well for many users so that it cannot be due to the hash at server. Perhaps, ios or the plugin create extra files after downloading & unzip?
According to a ticket in react-native-code-push, this is probably due to filenames being utf-8 multibyte strings (in my case an image asset with the german mutated vowel "ß", which is two byte in utf-8). I renamed all files to only use ASCII characters and haven't been able to reproduce it in the last minutes.
I feel like the problems seems come from unzipping process after the package has been downloaded. I logged all files' size and path (from thousands of users) after unzipping (I did inside the onError callback) and I found that:
Sometimes it has /hotcodepush.json file, sometimes has not.
The size of /www/cordova.js is different from the one on my machine which is used to build and push to codepush repo. The other files look ok.
Sometimes the root directory / is empty <--- the unzipping process was interrupted somehow?
I'm using CodePush for my cordova project. I see this message in the console:
The weird thing is that it is not happening to all users, only 3% of my users are getting problem and I cannot replicate it locally (it happened to me too but just 5, 6 times of about 500 times I did release). Once I've got this issue, the app is unable to get any new update, it gets stuck at the old version forever even when I release a new version.
I check out the source and found it was due to:
computedHash !== newUpdateHash
I incline to the computed hash at client because it works well for many users so that it cannot be due to the hash at server. Perhaps, ios or the plugin create extra files after downloading &
unzip
?Here are my packages:
I need to replicate it locally then I could find out a solution.
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: