Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with GitHub action macos-12 runner + RN 0.68.5 = Library not loaded: @rpath/hermes.framework/hermes #35536

Closed
kopax-polyconseil opened this issue Dec 2, 2022 · 7 comments
Labels
Platform: macOS Building on macOS.

Comments

@kopax-polyconseil
Copy link

kopax-polyconseil commented Dec 2, 2022

Description

We are trying to produce an iOS simulator build within a GitHub action macos-12 runner.

This is how we build :

cd ios
scheme=PassCulture-Staging
xcodebuild -workspace PassCulture.xcworkspace -scheme ${scheme} -sdk iphonesimulator -configuration Release
last_build_dir=$(ls -tr  ~/Library/Developer/Xcode/DerivedData/ | grep PassCulture | tail -n1)
ditto -ck --sequesterRsrc --keepParent ~/Library/Developer/Xcode/DerivedData/${last_build_dir}/Build/Products/Release-iphonesimulator/PassCulture.app ../PassCulture.zip
cd ..

This build works fine within local environment, it also work within the CI but the one from the CI produce an iOS app that fail to start

Version

0.68.5

Output of npx react-native info

System:
OS: Linux 5.8 Debian GNU/Linux 10 (buster) 10 (buster)
CPU: (8) x64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
Memory: 3.69 GB / 15.30 GB
Shell: 5.0.3 - /bin/bash
Binaries:
Node: 18.7.0 - ~/.nvm/versions/node/v18.7.0/bin/node
Yarn: 1.22.15 - ~/.yarn/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v18.7.0/bin/npm
Watchman: 20210124.162314.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 26, 27, 28, 29, 30, 31, 32, 33
Build Tools: 28.0.2, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0
System Images: android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 1.8.0_231 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.5 => 0.68.5
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Build your iOS app with hermes enabled using a macos-12 github action runner

Snack, code example, screenshot, or link to a repository

Error logs: https://gist.github.com/kopax-polyconseil/cd31322d8d71b664a0c965be7a1607e0#file-ios-log-L28

Reason for crash:


Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/hermes.framework/hermes
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/7C23C39D-FA27-425C-9B5C-FB06AC4A982C/data/Containers/Bundle/Application/61E9F720-7C7A-4822-9B34-F52954645757/PassCulture.app/PassCulture
Reason: tried: '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes' (no such file), '/usr/lib/swift/hermes.framework/hermes' (no such file), '/Users/dka/Library/Developer/CoreSimulator/Devices/7C23C39D-FA27-425C-9B5C-FB06AC4A982C/data/Container
(terminated at launch; ignore backtrace)
@cortinico
Copy link
Contributor

This build works fine within local environment, it also work within the CI but the one from the CI produce an iOS app that fail to start

How about if you build with the commands locally? Is the produced app working fine?

@kopax-polyconseil
Copy link
Author

kopax-polyconseil commented Dec 2, 2022

How about if you build with the commands locally? Is the produced app working fine?

It work fine if I build locally.

Other way around:

  • the build made locally work fine in GitHub action (when I execut e2e tests).
  • if I build in the CI, it fail both to run e2e tests with this error, locally and in the runner

@cortinico
Copy link
Contributor

It work fine if I build locally.

Then you should be able to debug what's the difference between your environment and the CI environment. I'm not sure how we can help you here.

@kopax-polyconseil
Copy link
Author

I was able to see the difference. As you can see hermes cannot be found in the simulator. I found this #34601 but all the workaround does apply not for a CI environment.

It's 2 hours build step, any clue would be enough for me to try to fix the CI

Should I report in hermes ?

@kopax-polyconseil
Copy link
Author

BTW: le label platform linux is wrong, this is macos

@kopax-polyconseil kopax-polyconseil changed the title Build with GitHub action macos-11 runner + RN 0.68.5 = Library not loaded: @rpath/hermes.framework/hermes Build with GitHub action macos-12 runner + RN 0.68.5 = Library not loaded: @rpath/hermes.framework/hermes Dec 2, 2022
@kopax-polyconseil
Copy link
Author

Any update for this ?

@cortinico cortinico added Platform: macOS Building on macOS. and removed Platform: Linux Building on Linux. labels May 10, 2023
@cortinico
Copy link
Contributor

Then you should be able to debug what's the difference between your environment and the CI environment. I'm not sure how we can help you here.

I'm not sure which kind of update you're looking for @kopax-polyconseil
We can't login into your CI and fix it. If the build is working fine locally and not on CI, you should look into difference between the two environments. This is nothing actionable for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: macOS Building on macOS.
Projects
None yet
Development

No branches or pull requests

3 participants