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

Package content hash is not correct #28

Closed japreiss closed 6 years ago

japreiss commented 6 years ago

Problem

When creating a release with code signing, The package hash that the Electrode server generates does not match what the React Native Code Push client generates

Details

React Native code push client ignores the .codepushrelease file when generating the hash. The Electrode server includes that file when it is creating the hash.

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

Logs

12-12 17:03:42.662 13110-13178/? I/ReactNativeJS: Checking for updates.
12-12 17:03:50.006 13110-13178/? I/ReactNativeJS: Downloading package.
12-12 17:03:50.204 13110-13178/? I/ReactNativeJS: 7960 of 247945 received.
12-12 17:03:50.222 13110-13178/? I/ReactNativeJS: 13424 of 247945 received.
12-12 17:03:50.304 13110-13178/? I/ReactNativeJS: 39378 of 247945 received.
12-12 17:03:50.391 13110-13178/? I/ReactNativeJS: 54404 of 247945 received.
12-12 17:03:50.405 13110-13178/? I/ReactNativeJS: 78992 of 247945 received.
12-12 17:03:50.422 13110-13178/? I/ReactNativeJS: 95384 of 247945 received.
12-12 17:03:50.490 13110-13178/? I/ReactNativeJS: 144560 of 247945 received.
12-12 17:03:50.507 13110-13178/? I/ReactNativeJS: 173246 of 247945 received.
12-12 17:03:50.524 13110-13178/? I/ReactNativeJS: 204664 of 247945 received.
12-12 17:03:50.577 13110-13178/? I/ReactNativeJS: 214226 of 247945 received.
12-12 17:03:50.592 13110-13178/? I/ReactNativeJS: 234716 of 247945 received.
12-12 17:03:50.601 13110-13178/? I/ReactNativeJS: 247945 of 247945 received.
12-12 17:03:50.654 13110-13177/? D/ReactNative: [CodePush] Applying full update.
12-12 17:03:50.654 13110-13177/? D/ReactNative: [CodePush] Signature Path: /data/user/0/my.app.package/files/CodePush/6e1f6bf2034dd317c2ff9d367f6ce55a3b5dc8439f9140a3cc38acb45c41097b/CodePush/.codepushrelease
12-12 17:03:50.654 13110-13177/? D/ReactNative: [CodePush] isSignatureAppearedInBundle: true
12-12 17:03:50.654 13110-13177/? D/ReactNative: [CodePush] Verifying hash for folder path: /data/user/0/my.app.package/files/CodePush/6e1f6bf2034dd317c2ff9d367f6ce55a3b5dc8439f9140a3cc38acb45c41097b
12-12 17:03:50.659 13110-13177/? D/ReactNative: [CodePush] Manifest string: ["CodePush/drawable-mdpi/app_image_star.png:90d492bdfbf4c14d3f2511b46a2506e7a8007fb527aad38ddffe650bbe3e96fc","CodePush/drawable-mdpi/node_modules_reactnativeelements_src_rating_images_bell.png:315749213623d6d0f095ed3a2bea7c205a7c85a1799014f7831bb30df73d0188","CodePush/drawable-mdpi/node_modules_reactnativeelements_src_rating_images_heart.png:bf6adfcc3b77fdc0e224a8dd84ff1e8ee109645daae9bb32486b70cce6fc0316","CodePush/drawable-mdpi/node_modules_reactnativeelements_src_rating_images_rocket.png:202386b813319debcf2a4a5307f01ae42e451c619dc25ad53df888a6045f7aa9","CodePush/drawable-mdpi/node_modules_reactnativeelements_src_rating_images_star.png:42899d377ac160d251ea1ccaf1570a666bb191ff0a0a5440acd322f85c5abb95","CodePush/index.android.bundle.meta:bb089df20e1137756a2e39c241ad8cd2cf542135f92ac5ec3d1ce73aebf5f828","CodePush/index.android.bundle:661de3bd59f49e338b457b11cfaa5364222f27a63fbd9e5027cb1825ea03ed9f"]
12-12 17:03:50.660 13110-13177/? D/ReactNative: [CodePush] Expected hash: 6e1f6bf2034dd317c2ff9d367f6ce55a3b5dc8439f9140a3cc38acb45c41097b, actual hash: 2822964b577d60f0f40b75c8127d40c3d684476ad5896cef2baa78b2d225b66e
12-12 17:03:50.693 13110-13178/? I/ReactNativeJS: [CodePush] The update contents failed the data integrity check.
datvong-wm commented 6 years ago

What version of Electrode server is this test done against?

japreiss commented 6 years ago

We are using 3.0.0 to do the testing. Released on Dec 11th.

On Dec 12, 2017, at 5:29 PM, Dat Vong notifications@github.com wrote:

What version of Electrode server is this test done against?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.