expo: expo-dev-client crashes on launch with jsEngine hermes in Expo SDK 47
Summary
In a blank typescript expo sdk 47 project with the expo-dev-client installed, the dev-client crashes on launch when "jsEngine": "hermes" is configured. From both expo run:ios -d or eas build --local. Removing “jsEngine”:“hermes” and doing a clean prebuild resolves the issue. Android builds and launches fine with hermes enabled.
Managed or bare workflow?
managed
What platform(s) does this occur on?
iOS
Package versions
"dependencies": {
"expo": "~47.0.3",
"expo-dev-client": "~2.0.0",
"expo-status-bar": "~1.4.2",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.5",
"react-native-web": "~0.18.9",
"expo-splash-screen": "~0.17.4"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/react": "~18.0.14",
"@types/react-native": "~0.70.6",
"typescript": "^4.6.3"
},
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.5
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
Yarn: 1.22.18 - ~/.nvm/versions/node/v14.18.1/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
Watchman: 2022.10.31.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/tyrauber/.rvm/gems/ruby-2.6.3/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
npmPackages:
expo: ~47.0.3 => 47.0.3
react: 18.1.0 => 18.1.0
react-dom: 18.1.0 => 18.1.0
react-native: 0.70.5 => 0.70.5
react-native-web: ~0.18.9 => 0.18.10
npmGlobalPackages:
eas-cli: 2.6.0
expo-cli: 6.0.8
Expo Workflow: bare
Reproducible demo
expo inita new SDK 47 typescript blank project.expo install expo-dev-client- Add
"jsEngine": "Hermes"to App.json expo prebuild --cleanexpo run:ios -d
Immediate crash on launch of expo dev client.
eas build --localhas the same result.
Building on EAS, I see the following error:
❌ ld: '/Users/expo/Library/Developer/Xcode/DerivedData/expo47hermes-ahzelgosugfnasazrehjslikbwpu/Build/Intermediates.noindex/ArchiveIntermediates/expo47hermes/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/EXFileSystem/EXFileSystem.framework/EXFileSystem(EXFileSystemAssetLibraryHandler.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/expo/Library/Developer/Xcode/DerivedData/expo47hermes-ahzelgosugfnasazrehjslikbwpu/Build/Intermediates.noindex/ArchiveIntermediates/expo47hermes/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/EXFileSystem/EXFileSystem.framework/EXFileSystem' for architecture arm64
If I add "bitcode": "Debug" to the ios declaration in app.json, run expo prebuild --clean and push a new build to eas, I see the following error:
❌ Undefined symbols for architecture arm64
┌─ Symbol: _objc_msgSend$storyboardWithName:bundle:
└─ Referenced from: l001 in EXSplashScreen(EXSplashScreenViewNativeProvider.o)
❌ ld: symbol(s) not found for architecture arm64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
Stacktrace (if a crash is involved)
ASI found [dyld] (sensitive) ‘Library not loaded: ‘@rpath/hermes.framework/hermes’ Referenced from: ‘/private/var/containers/Bundle/Application/BDAD3C0A-943F-4416-851D-A0FF21314832/expo47hermes.app/expo47hermes’ Reason: tried: ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/private/var/containers/Bundle/Application/BDAD3C0A-943F-4416-851D-A0FF21314832/expo47hermes.app/Frameworks/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/private/var/containers/Bundle/Application/BDAD3C0A-943F-4416-851D-A0FF21314832/expo47hermes.app/Frameworks/hermes.framework/hermes’ (no such file), ‘/System/Library/Frameworks/hermes.framework/hermes’ (no such file)’
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 28 (1 by maintainers)
It’s still not working for me (on Intel MacBook)
Have the same thing happening: xcode logs:
Just wanted to pop in and say I was having these hermes-related crashes on Expo SDK 48 and updating
cocoapodswith gem did the trick after hours of hitting my head against a wall 😃It works when using EAS but still crashes when built locally using
expo run:ios. Assuming it’s a cache thing, but I tried deleting the derived data folder.Update: Even with a new app that I copy pasted from the original, it still happens so don’t think it’s a cache thing.
Upgrading ruby to the recommended >2.7.6 (used the most recent 2.x release 2.7.7) with rbenv seemed to make all the difference for me.