-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
use_framework! + hermes enable = Undefined symbols "vtable for facebook::react::HermesExecutorFactory" #34344
Comments
It is fixed here: 79baca6 |
still happens on 0.70 |
@lightrow could you share more details? it works for me on a blank 0.70 project. |
ah i just realized it's slightly different
arm64 instead of x86_64. I have an M1 |
I also have this problem (without an M1 and with architecture x86_64)
|
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.
|
Experiencing this too:
|
I think we must use frameworks like this
In my case, I am using Firebase, and with react-native 0.70 and Firebase v9+ the docs advised to use this way. |
This solved my issue and commented out |
I am having this same issue after upgrading to 0.70.2. use_frameworks! :linkage => :static does not work for me. We are integrating react native into an existing native app that heavily uses Bond, which requires use_frameworks! and does not work with the static linking. I also tried selectively statically/dynamically linking pods targets (https://stackoverflow.com/questions/37388126/use-frameworks-for-only-some-pods-or-swift-pods). This gets rid of the hermes error, but we are using Bond in our project and this results in a bond issue (Include of non-modular header inside framework module 'Bond.Bond') |
Weirdly enough, I'm having the same issue, but I'm not using
Solution:The new
|
I managed to build for iOS with Hermes enabled with
|
@tapz I also had this issue with MaterialCommunity from react-native-vector-icons. I got around it by selectively statically + dynamically loading pod targets instead of globally using :linkage => :static. I posted the stackoverflow link above. |
@avenable8 I have no idea, which ones to set static and which dynamic. I'll just disable Hermes and wait until it and all dependencies are mature enough. |
Also getting this error on RN 0.70.3
|
Config frameworks like this |
Still having the same issue with Here is my config, any advice ? RN 0.70.4 require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
target 'Tellingtone' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text', :modular_headers => true
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => false,
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
#:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-async-storage/async-storage'
pod 'RNFS', :path => '../node_modules/react-native-fs'
target 'TellingtoneTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end |
@GrimDev # iOS 14.5
# RNFBAnalytics: Using default Firebase/Analytics with Ad Ids. May require App Tracking Transparency. Not allowed for Kids apps
$RNFirebaseAnalyticsWithoutAdIdSupport=true
$RNFirebaseAsStaticFramework = true
# $FirebaseSDKVersion = '7.0.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
install! 'cocoapods', :deterministic_uuids => false
target 'demo' do
use_frameworks! :linkage => :static
inhibit_all_warnings!
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'react-native-version-check', :path => '../node_modules/react-native-version-check'
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-') || pod.name.eql?('RNVectorIcons')
def pod.build_type;
# Uncomment the line corresponding to your CocoaPods version
Pod::BuildType.static_library # >= 1.9
# Pod::Target::BuildType.static_library # < 1.9
end
end
end
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end |
try Jichao@f54159f |
@GrimDev
|
Hello Please anyone helpme out, I'm struggling with the error from few days, I only encounter the error when archiving the app, I tried the solution of @Jichao , however I'm now getting another error in the
here is my Podfile
Any help is really appreciated |
Do not use static linkage, |
Thanks a lot! It works for me with RN 0.70.5 with Hermes Enabled without static linkage for use_frameworks!. Any Idea when it will going to merge in RN update? |
After this, I'm getting error in the Reanimated Pod:
|
For me applying this patch resulted in the following error from my Podfile has use_framework! without static linkage |
I have only tested on 0.70.2, maybe spec the version in pod file |
Thanks alot for your help, actually the issue was with react-native-reanimated, I managed to solve this issue. Thanks! |
This one worked for me |
1- works for me in Recat Native 0.70.6 |
im also facing this issue in rn-0.70.2
|
same error |
Thank you, it works! on |
@Mrezagolbaba This makes the build progress, but still fails with |
For those who can't use use_frameworks!
$static_framework = [ 'YogaKit', 'RCT-Folly', 'RCTTypeSafety', 'ReactCommon']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.start_with?('React-') || $static_framework.include?(pod.name)
def pod.build_type;
# Uncomment the line corresponding to your CocoaPods version
# Pod::BuildType.static_library # >= 1.9
# Pod::Target::BuildType.static_library # < 1.9
end
end
end
end You can also add other frameworks/libraries to the |
Thank you. @Jichao this worked and remove static linkage from your pod file |
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 ! |
nice, it saved me... thank you |
React-native: 0.72.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;
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: Hope it helped someone :) |
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. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
Hi guys,
I'm trying to use hermes with use_framework!.
After the patch i got another issue:
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
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: