use_framework! + hermes enable = Undefined symbols "vtable for facebook::react::HermesExecutorFactory"
See original GitHub issueDescription
Hi guys,
I’m trying to use hermes with use_framework!.
- I was on 0.66.4, with hermes disabled and use_framework enabled. My app was working great, but on some Android device i got a crash from JSC so we decided to enable hermes.
- I tried to use both hermes and use_framework but it don’t work. After some research i understand i have to upgrade RN to 0.69.3.
- After Upgrade i got an issue wich was fixed by this PR :https://github.com/facebook/react-native/commit/88b7b640a74bafd918b8b1cd5d58e1f5ddfb730
- I patched react-native to integrate this PR
After the patch i got another issue:
Undefined symbols for architecture x86_64: “vtable for facebook::react::HermesExecutorFactory”, referenced from: facebook::react::HermesExecutorFactory::HermesExecutorFactory(std::__1::function<void (facebook::jsi::Runtime&)>, std::__1::function<void (std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)> const&, hermes::vm::RuntimeConfig) in RCTCxxBridge.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Someone know how i can fix this issue ? Cause for now, i can’t use hermes and use_framework together on all version of RN
Version
0.69.3
Output of npx react-native info
System: OS: macOS 12.0.1 CPU: (10) x64 Apple M1 Pro Memory: 135.61 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v14.17.0/bin/yarn npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm Watchman: 2022.05.16.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.10.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 11.0.11 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.3 => 0.69.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
- Upgrade RN from 0.66.4 -> 0.69.3
- Patch RN with : https://github.com/facebook/react-native/commit/88b7b640a74bafd918b8b1cd5d58e1f5ddfb730
- Enable Hermes
- Enable use_framework
Snack, code example, screenshot, or link to a repository
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:35 (4 by maintainers)

Top Related StackOverflow Question
I think we must use frameworks like this
use_frameworks! :linkage => :staticIn my case, I am using Firebase, and with react-native 0.70 and Firebase v9+ the docs advised to use this way.
still happens on 0.70