Closed
Description
If release an update with Code Signing the package_hash stored in database have to be equal the hash inside JWT token (.codepushrelease). What is calculated by the server mismatch the hash inside JWT of the bundle.
Steps to reproduce:
- Generate public and private key
- Add the public key to config.xml
<preference name="CodePushPublicKey" value="MIIBIjANB...">
(without ----BEGIN--- and without breaklines) - Release update with
--privateKeyPath
pointing to private key file. - Try update from the App.
- You'll receive:
The update contents failed the data integrity check.. StackTrace: packageHashSuccess
To fix:
- Copy the bundle file from the server to your machine, add
.zip
to filename and extract. - Open the
www/.codepushrelease
and copy the content (this is a JWT). - Paste on https://jwt.io and copy the
contentHash
- Replace the column
packages.update_hash
withcontentHash
value. - Make sure refresh packages cache from server.
- Try update again, and works.
Metadata
Metadata
Assignees
Labels
No labels