microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.98k stars 1.47k forks source link

Signing of update #2766

Closed danielpetersson closed 2 weeks ago

danielpetersson commented 2 weeks ago

We are currently using appcenter codepush CLI to release update. We are using --private-key-path to sign the update. Releasing with the react-native-code-push CLI doesn't have support for --private-key-path which causes the app (which verifies the downloaded update) to output:

10-16 10:19:51.588   966   966 D ReactNative: [CodePush] Loading JS bundle from "assets://index.android.bundle"
10-16 10:19:53.599   966  1085 D ReactNative: [CodePush] Applying full update.
10-16 10:19:53.601   966  1085 E ReactNative: [CodePush] Exception
10-16 10:19:53.601   966  1085 E ReactNative: com.microsoft.codepush.react.CodePushInvalidUpdateException: Error! Public key was provided but there is no JWT signature within app bundle to verify. Possible reasons, why that might happen: 
10-16 10:19:53.601   966  1085 E ReactNative: 1. You've been released CodePush bundle update using version of CodePush CLI that is not support code signing.
10-16 10:19:53.601   966  1085 E ReactNative: 2. You've been released CodePush bundle update without providing --privateKeyPath option.
10-16 10:19:53.601   966  1085 E ReactNative:   at com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage(CodePushUpdateManager.java:278)
10-16 10:19:53.601   966  1085 E ReactNative:   at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:298)
10-16 10:19:53.601   966  1085 E ReactNative:   at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:292)

Should we sign the update as a pre-step to "code-push-standalone release-react" or can we, and is it recommended, to somehow disable the need of validating signing in our app?

danielpetersson commented 2 weeks ago

Yes, it is working. It was accidentally posted here but should have been posted to https://github.com/microsoft/code-push-server.

Den ons 16 okt. 2024 13:25MikhailSuendukov @.***> skrev:

Hello! Thank you for reaching out. Could you let us know if you've found a solution to your issue? If so, we’d appreciate it if you could share the details with us.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/react-native-code-push/issues/2766#issuecomment-2416522972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF2LHYMTS3RDQNZ4OOIHHLZ3ZEJ7AVCNFSM6AAAAABQA5BJDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJWGUZDEOJXGI . You are receiving this because you modified the open/close state.Message ID: @.***>