Repository navigation
Description
Description
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 :88b7b64
- 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, std::__1::allocator > ()>)> 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 : 88b7b64
- Enable Hermes
- Enable use_framework

Activity
cortinico commentedon Aug 5, 2022
I don't think Hermes currently supports
use_framework. @dmitryrykun @neildhar @Kudo and other folks might have more context than me on this.dmytrorykun commentedon Aug 5, 2022
It is fixed here: 79baca6
It is in the main branch and in 0.70.0-rc.2, but not in 0.69.3
lightrow commentedon Sep 6, 2022
still happens on 0.70
Kudo commentedon Sep 7, 2022
@lightrow could you share more details? it works for me on a blank 0.70 project.
lightrow commentedon Sep 7, 2022
ah i just realized it's slightly different
arm64 instead of x86_64. I have an M1
Minishlink commentedon Sep 7, 2022
I also have this problem (without an M1 and with architecture x86_64)
Fabric is disabled
Flipper is disabled (won't work with use_framework anyway)
Derived data and build folder are clean
XCode 13.4.1
lightrow commentedon Sep 7, 2022
I also just tested with an empty project, only added

use_frameworks!to Podfile and got the same errorarch -x86_64 pod installand running Xcode with Rosetta results in the same error with x86_64 instead of arm64tapz commentedon Sep 10, 2022
I have this issue too in my Intel Mac. I have never been able to build for iOS with Hermes enabled. 0.70.0 did not change this.
itsramiel commentedon Sep 13, 2022
Experiencing this too:
mmelk commentedon Sep 15, 2022
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.
Hugyn commentedon Oct 1, 2022
This solved my issue
use_frameworks! :linkage => :static
and commented out
:flipper_configuration => FlipperConfiguration.enabled,
21 remaining items
Mrezagolbaba commentedon Dec 5, 2022
1-
use_frameworks! :linkage => :static(inside target 'projectName' do)2- disabled
:flipper_configuration => FlipperConfiguration.enabled3- add
s.dependency "React-hermes", versionin side/node_modules/react-native/React-Core.podspecworks for me in Recat Native 0.70.6
sudharsanvishnu commentedon Dec 6, 2022
im also facing this issue in rn-0.70.2
tried below steps
YAMMOUNII commentedon Dec 14, 2022
same error
The following build commands failed: Ld /Users/user/Library/Developer/Xcode/DerivedData/Elnashra-hjdnhtbsafvjvofifgzvhxjxpzcd/Build/Products/Debug-iphonesimulator/React-Core/React.framework/React normal (1 failure)what can i do ?
acro5piano commentedon Dec 19, 2022
Thank you, it works! on
0.70.6nandha-kumar-hajari commentedon Dec 20, 2022
Adding this fixed it for me

douugdev commentedon Jan 18, 2023
For those who can't use
use_frameworks! :linkage => :static, you can manually convert only react-specific libraries by doing:You can also add other frameworks/libraries to the
$static_frameworklist to convert it as well.Tested on RN 0.70.6.
Shubhambhagatofficial commentedon Jan 24, 2023
Thank you. @Jichao
Saved my week's work.
this worked
add
s.dependency "React-hermes", version
to react-core.podspec
and remove static linkage from your pod file
MarinaAmy commentedon Feb 3, 2023
I have the same problem:
818 duplicate symbols for architecture arm64 on my project.
I'm not sure how to fix it, but I've been running around in circles for a few days now :/
I've put the line use_frameworks in my podfile! :linkage => :static and I activated hermes
Thank you !
paulopgss commentedon Feb 12, 2023
nice, it saved me... thank you
bartkoedijk commentedon Jun 26, 2023
React-native: 0.72.0
@react-native-firebase/app: 18.1.0
I had the same issue. I cleaned my IOS build folder in Xcode (Product -> Clean Build folder)
Then I added the following line in multiple files;
s.dependency 'React-hermes', versionnode_modules/react-native/RNReanimated.podsec ,
node_modules/react-native/React.podspec,
node_modules/react-native-reanimated/React-Core.podspec
I changed the following in the Podfile:
If you are upgrading your react native version this repo might help you. This maintainer has a repo with the release versions for a basic react native application, the branches shows the release version:
https://github.com/react-native-community/rn-diff-purge/tree/release/0.72.0
Or if you would like to compare the changes you can use this website;
https://react-native-community.github.io/upgrade-helper/
Hope it helped someone :)
github-actions commentedon Jan 14, 2024
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
github-actions commentedon Feb 5, 2024
This issue was closed because it has been stalled for 7 days with no activity.