react-native: App crashes with `dyld[38734]: symbol not found in flat namespace '_jump_fcontext'` with `use_frameworks!`
New Version
0.73.0-rc.1
Old Version
0.72.5
Build Target(s)
iOS simulator
Output of react-native info
System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Max
Memory: 23.29 GB / 64.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.16.1
path: /var/folders/5l/y80kyhh93kl22_mbytwl_hg40000gq/T/yarn--1696591343127-0.3534219795138642/node
Yarn:
version: 1.22.19
path: /var/folders/5l/y80kyhh93kl22_mbytwl_hg40000gq/T/yarn--1696591343127-0.3534219795138642/yarn
npm:
version: 9.5.1
path: ~/.volta/tools/image/node/18.16.1/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.12.1
path: /Users/louis.zawadzki/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.16.1
path: /Users/louis.zawadzki/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 2.7.5
path: /Users/louis.zawadzki/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.0-rc.1
wanted: 0.73.0-rc.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Issue and Reproduction Steps
- Create a new project with
npx react-native@latest init MyApp --version 0.73.0-rc.1
- Run
(cd ios && USE_FRAMEWORKS=dynamic pod install)
- Build the app using XCode 15
The app crashes immediately with the following error:
dyld[38734]: symbol not found in flat namespace '_jump_fcontext'
XCode screenshot:
About this issue
- Original URL
- State: open
- Created 9 months ago
- Reactions: 1
- Comments: 37 (22 by maintainers)
Commits related to this issue
- Fix symbol not found _jump_fcontext with use_frameworks! Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when they were b... — committed to cipolleschi/react-native by cipolleschi 6 months ago
- Fix symbol not found _jump_fcontext with use_frameworks! (#42230) Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when t... — committed to cipolleschi/react-native by cipolleschi 6 months ago
- Fix symbol not found _jump_fcontext with use_frameworks! (#42230) Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when t... — committed to cipolleschi/react-native by cipolleschi 6 months ago
- Fix symbol not found _jump_fcontext with use_frameworks! (#42230) Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when t... — committed to cipolleschi/react-native by cipolleschi 6 months ago
- Fix symbol not found _jump_fcontext with use_frameworks! (#42230) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42230 While developing Xcode 15, Apple reimplemented t... — committed to gokul1099/react-native-visionos by cipolleschi 6 months ago
- Fix symbol not found _jump_fcontext with use_frameworks! (#42230) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42230 While developing Xcode 15, Apple reimplemented t... — committed to retyui/react-native by cipolleschi 6 months ago
So, I was able to test using Firebase Test Lab and it looks like that older devices are working.
I created PRs also for the supported versions:
@cipolleschi, I tried those steps, and I get the
dyld[620]: symbol not found in flat namespace '_jump_fcontext'
error only when I run in a physical device. If I target a simulator, everything works fine.Here’s the requested info, if it helps:
And the output of
react-native info
:@piraces yes, I’ll work on that this week or next week, worst case scenario. There are a few test that I want to run, to make sure we don’t break React Native for other users, but I’m planning that work! Many thanks for reporting this.
I’m very sad. Xcode 15.2 => everytyhing works. Xcode 15.3 => crashes with the above error.
This is an Xcode regression. I’ll try to:
-Wl -ld_classic
flags and see if it fixes.Hi everyone. I’ve spent a couple of days investigating the issue. I think we should be able to fix the problem by adding this patch to the
utils.rb
file:With these changes, I was able to run a 0.73 app on the device.
However, the reason why we have to add the
-ld_classic
flag with Xcode 15 was because Apple reimplemented the linker in Xcode 15 and it was not compatible with versions of iOS < 15.Now, I cannot install iOS 14.5 on my laptop anymore, because it is not compatible with Sonoma. The last version of macOS that can install and build iOS < 15 is macOS 13.5 IIRC (which is Ventura).
Is there someone that can help out by:
node_modules/react-native/scripts/cocoapods/utils.rb
file applying the patches aboveThe help would be much appreciated and will help the whole community!
Thanks for the reporting. Next week I’ll be back in the office, with a better connection and bandwidth, and I’ll be able to download multiple Xcode and test with/without the flags on multiple system to implement a solution that might work for everyone.
My understanding, as of today is that:
I want to test these hypothesis, but my current connectivity foes not allow me to download 30+ Gb in a day 🤦
I’m really sorry for this as I hoped we fixed this for good. 😦 I’m discussing internally how to move forward, perhaps we can find a fix and backport it to 0.73 as well, but it will take some time…
Hi everyone, I was on a long PTO (3 weeks) and came back this week. I’m looking into this.
Hi there @cipolleschi , I keep getting the error mentioned in the issue when running on a physical device (using the
USE_FRAMEWORKS=static
workaround).Using Xcode 15.1:
The output of
react-native info
:Any ideas on how to get on this? Thank you!
EDIT: managed to build & run successfully by removing
-ld_classic
from thePods
project:Dynamic frameworks are not critical in my app, so let’s get back to the good old static 🐢 🐢
Thanks for looking into this! Got really confused to have the crash back when upgrading to XCode 15.3 🥲
Some good and bad news here.
The good news are that:
The reason why 0.74 is not affected even with Dynamic Frameworks is the following:
Folly/Futures
can’t find the symbol_jump_fcontext
._jump_fcontext
is provided byboost
, butboost
is linked as an empty target in React Native, so, when it compiled to a Dynamic Frameworks, there is no code that the dynamic linker can search for the symbol.Folly/Future
, so we are not looking for the symbol anymore.The bad news is that, even by re-enabling the
-ld_classic
flag, 0.73 with Dynamic Frameworks is still broken.@bruno-centanaro @sunzongzheng how critical is the dynamic framework setup for you? Would your app work also with the static framework setup?
No I was only building. I’ll try to connect a device, then.
Are you running it on a device later? Because my issue is not compiling/building but if I run it on a physical device
@cipolleschi, I’ve attempted to target iOS 17 using Xcode 15.1, but I’m encountering the same issue on a real device:
dyld[1495]: symbol not found in flat namespace ‘_jump_fcontext’
@cipolleschi i have the exact same problem. Started a new project
npx react-native@latest init AwesomeProjectTest
, ranUSE_FRAMEWORKS=dynamic NO_FLIPPER=1 pod install
and then i get this
React Native info: