Skip to content

Package Hash missmatch with Code Signing #75

Closed
@ludufre

Description

@ludufre

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 with contentHash value.
  • Make sure refresh packages cache from server.
  • Try update again, and works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions