question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

use_framework! + hermes enable = Undefined symbols "vtable for facebook::react::HermesExecutorFactory"

See original GitHub issue

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 :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

Snack, code example, screenshot, or link to a repository

image

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:9
  • Comments:35 (4 by maintainers)

github_iconTop GitHub Comments

29reactions
mmelkcommented, Sep 15, 2022

I think we must use frameworks like this

use_frameworks! :linkage => :static

In my case, I am using Firebase, and with react-native 0.70 and Firebase v9+ the docs advised to use this way.

13reactions
lightrowcommented, Sep 6, 2022

still happens on 0.70

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable hermes engine for ios: React native on Mac M1
After enabling hermes engine in podfile throws error while building app. "Undefined symbols for architecture x86_64: "vtable for ...
Read more >
Developers - Undefined symbol: vtable for facebook::react
Undefined symbol : vtable for facebook::react::HermesExecutorFactory with Hermes enable in iOS.
Read more >
Using Hermes - React Native
Hermes is an open-source JavaScript engine optimized for React ... You can still disable Hermes using the command described in this page.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found