Skip to content

Use hermes bundled with React Native#1988

Merged
AnatolyPristensky merged 1 commit intomicrosoft:masterfrom
zolbooo:bundled-hermes-rn
Jul 12, 2022
Merged

Use hermes bundled with React Native#1988
AnatolyPristensky merged 1 commit intomicrosoft:masterfrom
zolbooo:bundled-hermes-rn

Conversation

@zolbooo
Copy link
Copy Markdown

@zolbooo zolbooo commented Jul 1, 2022

This PR updates release-react command to use node_modules/react-native/sdks/hermesc, if exists. This allows codepush to use latest version of Hermes bundled with react-native.

More details about bundled Hermes: https://reactnative.dev/architecture/bundled-hermes

Fixes #1987.

@YangJonghun
Copy link
Copy Markdown

YangJonghun commented Jul 2, 2022

not works properly with below react-native-code-push code

...download bundle...
await localPackage.install(CodePush.InstallMode.ON_NEXT_RESTART)
CodePush.restartApp(true)

above code occurred crash and only works when application restart after fully closed

@zolbooo
Copy link
Copy Markdown
Author

zolbooo commented Jul 2, 2022

not works properly with below react-native-code-push code

...
await localPackage.install(CodePush.InstallMode.ON_NEXT_RESTART)
CodePush.restartApp(true)

above code occurred crash and only works when application restart after fully closed

Could provide a react-native version and crash logs?

@YangJonghun
Copy link
Copy Markdown

react-native: 0.69.1
crash log just provide message Cannot figure out the cause

@zolbooo
Copy link
Copy Markdown
Author

zolbooo commented Jul 2, 2022

react-native: 0.69.1

crash log just provide message Cannot figure out the cause

Is it Android? If it is, you can use logcat to provide crash stacktrace from the Android Studio.

@YangJonghun
Copy link
Copy Markdown

YangJonghun commented Jul 2, 2022

react-native: 0.69.1
crash log just provide message Cannot figure out the cause

Is it Android? If it is, you can use logcat to provide crash stacktrace from the Android Studio.

I copied from Flipper's crash reporter (same as logcat)

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
... device info...
backtrace:
      #00 pc 00000000002e1a98  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)
      #01 pc 00000000002e1960  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)
      #02 pc 00000000002e190c  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)
      #03 pc 00000000002d73d4  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)
      #04 pc 0000000000148998  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libreanimated.so (reanimated::NativeProxy::~NativeProxy()+72) (BuildId: B...)
      #05 pc 0000000000148b30  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libreanimated.so (reanimated::NativeProxy::~NativeProxy()+36) (BuildId: B...)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

my problem probably related with react-native-reanimated (I used version v2.9.1 in my project)

@zolbooo
Copy link
Copy Markdown
Author

zolbooo commented Jul 2, 2022

react-native: 0.69.1

crash log just provide message Cannot figure out the cause

Is it Android? If it is, you can use logcat to provide crash stacktrace from the Android Studio.

I copied from Flipper's crash reporter (same as logcat)


*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

... device info...

backtrace:

      #00 pc 00000000002e1a98  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)

      #01 pc 00000000002e1960  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)

      #02 pc 00000000002e190c  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)

      #03 pc 00000000002d73d4  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libhermes-executor-debug.so (BuildId: A...)

      #04 pc 0000000000148998  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libreanimated.so (reanimated::NativeProxy::~NativeProxy()+72) (BuildId: B...)

      #05 pc 0000000000148b30  /data/app/~~4q3iFniVJrs2ggXD7Lat-w==/com.sample.sample-ENgm5I8Cf8i1afL3Dn6mRw==/lib/arm64/libreanimated.so (reanimated::NativeProxy::~NativeProxy()+36) (BuildId: B...)

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

my problem probably related with react-native-reanimated (I used version v2.9.1 in my project)

I believe you should create an issue in react-native-reanimated repo. Don't forget to provide a repro 😉

@DmitriyKirakosyan
Copy link
Copy Markdown
Contributor

Hi @zolbooo , thank you for your contribution!
Will this work if we run the command outside the project dir?

@zolbooo
Copy link
Copy Markdown
Author

zolbooo commented Jul 5, 2022

Hi @zolbooo , thank you for your contribution!

Will this work if we run the command outside the project dir?

I am not sure, the fix is using same principle as hermes-engine package detection.

@AnatolyPristensky
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codepush on React Native 0.69 with Hermes is broken

4 participants