electrode-io / electrode-ota-server

Electrode Over The Air Server for hot deployment of React Native and Cordova mobile apps
Other
204 stars 40 forks source link

The update contents failed the data integrity check #23

Closed sdg9 closed 6 years ago

sdg9 commented 7 years ago

Problem

Using this server only the first app pushed is installed. Subsequent updates, while still downloaded, are not installed.

Details

After the first code push download, subsequent downloads will log "The update contents failed the data integrity check" which come's from react-native-code-push due to the hash computed locally not matching what the server says.

Note I don't believe the hash is ever correct, as the method to verify the hash is only called on subsequent updates.

I've tested against Microsoft's code push and it works with no issues.

Logs

[03:35:04] Checking for update.
[03:35:04] Downloading package.
[03:35:04] Installing update.
[03:35:04] Update is installed and will be run on the next app restart.
[03:35:17] Loading JS bundle from file:///Users/sdg9/Library/Developer/CoreSimulator/Devices/2E7B80ED-FD68-4CE8-887F-D3CC14B2C32C/data/Containers/Data/Application/ADF5D744-071E-4547-BBB4-E9418C2F8715/Library/Application%20Support/CodePush/ebc38c14ad26978456e15ab9d8fe5ded0bde16753027b8852a0b1123e70eadaf/CodePush/main.jsbundle
[03:35:17] Checking for update.
[03:35:17] Reporting CodePush update success (v5)
[03:35:17] App is up to date.
[03:40:25] Loading JS bundle from file:///Users/sdg9/Library/Developer/CoreSimulator/Devices/2E7B80ED-FD68-4CE8-887F-D3CC14B2C32C/data/Containers/Data/Application/ADF5D744-071E-4547-BBB4-E9418C2F8715/Library/Application%20Support/CodePush/ebc38c14ad26978456e15ab9d8fe5ded0bde16753027b8852a0b1123e70eadaf/CodePush/main.jsbundle
[03:40:25] Checking for update.
[03:40:26] Downloading package.
[03:40:26] An unknown error occurred.
[03:40:26] The update contents failed the data integrity check.
wjj12138 commented 6 years ago

@sdg9 hah,did you problem has solve?

yulianger commented 6 years ago

I alse have this problem....

datvong-wm commented 6 years ago

We're not aware of any issues with the latest code.

  1. Please provide the server versions you are using. Specifically, all the electrode-ota-* packages you have installed, your package.json dependencies and configurations.
  2. Please provide the client versions, device, etc.
  3. Provides steps to reproduce the issue. Or a POC project.
zhaoziliang commented 6 years ago

I also encountered this problem. I have compiled it with a Mac computer. So there is a .DS_Store file in the folder. After I delete this file and publish it using codepush, the problem is not there. I can try it.