react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

[iOS] Every codepush update release on RN 0.69 crashes throwing Fatal Exception: RCTFatalException: Compiling JS failed: Wrong bytecode version

Open marf opened this issue 1 year ago • 6 comments

Hello, everytime I try to release an update using codepush on iOS (but probably happens in Android too) after I update to RN 0.69 I get this crash:

Fatal Exception: RCTFatalException: Compiling JS failed: Wrong bytecode version. Expected 85 but got 84 Buffer size 10440312 starts with: c61fbc03c103191f540000008377d303
Compiling JS failed: Wrong bytecode version. Expected 85 but got 84 Buffer size 10440312 starts with: c61fbc03c103191f540000008377d303

I do not know if now RN controls some bytecode version number and if it sees a different version number it deliberately crashes.

I have Hermes enable in my project too.

Any solutions?

Thanks!

Environment

  • react-native-code-push version: 7.0.4
  • react-native version: 0.69
  • iOS/Android/Windows version: All iOS verions
  • Does this reproduce on a debug build or release build? Release
  • Does this reproduce on a simulator, or only on a physical device? Both

marf avatar Jul 18 '22 10:07 marf

I can see they made a fix here: https://github.com/microsoft/appcenter-cli/issues/1987 But there's still no new version of react-native-code-push.

RominHalltari avatar Jul 18 '22 18:07 RominHalltari

I can see they made a fix here: microsoft/appcenter-cli#1987 But there's still no new version of react-native-code-push.

The fix is actually in the appcenter CLI used to create the code push bundle and not in the react-native-code-push package installed in your app. Here are the install instructions for our team for the appcenter CLI built from their main branch: npm install -g https://github.com/microsoft/appcenter-cli.git // codepush android fix for RN 0.69 in master but not released yet - https://github.com/microsoft/appcenter-cli/issues/1987

Unfortunately we can't find a way to use a local CLI and use the appcenter.js file directly, so we all need to install appcenter from main instead of the latest april release. The above command should get you going.

jedashford avatar Jul 19 '22 03:07 jedashford

Hi @jedashford , @RominHalltari , @marf , Does code push supports react native version 0.68.1. Because as per the documentation only these versions are mentioned

image

geekyoperand avatar Jul 26 '22 22:07 geekyoperand

Hi @jedashford , @RominHalltari , @marf , Does code push supports react native version 0.68.1. Because as per the documentation only these versions are mentioned

image

We have used it in 68.2 and now in 69.1 in production without any issue. We do need to have the team and CD use main branch install of the appcenter cli as 69+ codepush deploy is broken in the appcenter cli latest release.

jedashford avatar Jul 27 '22 00:07 jedashford

This has been fixed in https://github.com/microsoft/appcenter-cli/releases/tag/v2.11.0, so the latest version of the CLI should compile correctly. I think this issue can be closed now.

amhinson avatar Aug 17 '22 12:08 amhinson

We can confirm its fixed in the latest version of the cli.

jedashford avatar Sep 16 '22 02:09 jedashford

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

ghost avatar Nov 15 '22 05:11 ghost

When code push will stable version for this? Last code push version is released in July.

jigneshpatel-dreampay avatar Dec 14 '22 09:12 jigneshpatel-dreampay