react-native: [SOLVED] React Native 0.70.0 iOs fresh project errors out on `run-ios`

edit by @kelset: this issue is caused by the Ruby version installed. Please refer to this comment for steps to fix it.


I just wanted to try out the latest release from yesterday which is 0.70, but did not work at all as a default empty project

It’s immediately crashing when i run it

Description

Description

`Translated Report (Full Report Below)

Incident Identifier: B813BAD6-A8CA-4003-B965-6FE4733EC654 CrashReporter Key: 6FE47381-36D7-18B0-B222-F84F8B90D961 Hardware Model: MacBookPro16,1 Process: testproject [10096] Path: /Users/USER/Library/Developer/CoreSimulator/Devices/5ECF7949-51A1-4E17-B4CE-E7186750E864/data/Containers/Bundle/Application/5089FB61-ED38-4EA9-B58F-6395012D6D83/testproject.app/testproject Identifier: org.reactjs.native.example.testproject Version: 1.0 (1) Code Type: X86-64 (Native) Role: Foreground Parent Process: launchd_sim [7524] Coalition: com.apple.CoreSimulator.SimDevice.5ECF7949-51A1-4E17-B4CE-E7186750E864 [31205] Responsible Process: SimulatorTrampoline [3271]

Date/Time: 2022-09-06 14:53:35.0726 +0300 Launch Time: 2022-09-06 14:53:35.0415 +0300 OS Version: macOS 12.5.1 (21G83) Release Type: User Report Version: 104

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: DYLD 1 Library missing Library not loaded: @rpath/hermes.framework/hermes Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/5ECF7949-51A1-4E17-B4CE-E7186750E864/data/Containers/Bundle/Application/5089FB61-ED38-4EA9-B58F-6395012D6D83/testproject.app/testproject Reason: tried: ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), '/Users/bayram/Library/Developer/CoreSimulator/Devices/5ECF7949-51A1-4E17-B4CE-E7186750E864/data/Containers/Bundle/Application/5089FB61-ED38-4EA9-B58F-6395012D6D83/testproject.app/Frame (terminated at launch; ignore backtrace)

Triggered by Thread: 0

Thread 0 Crashed: 0 dyld 0x11192298e __abort_with_payload + 10 1 dyld 0x111938a72 abort_with_payload_wrapper_internal + 80 2 dyld 0x111938aa4 abort_with_payload + 9 3 dyld_sim 0x10d0108eb abort_with_payload + 26 4 dyld_sim 0x10cfd04eb dyld4::halt(char const*) + 375 5 dyld_sim 0x10cfccc1c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3070 6 dyld_sim 0x10cfcce42 _dyld_sim_prepare + 379 7 dyld 0x1118e2b78 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1265 8 dyld 0x1118e170e dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244 9 dyld 0x1118e14e4 start + 388

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000002000209 rbx: 0x0000000000000000 rcx: 0x00007ff7b6201378 rdx: 0x00007ff7b62017f0 rdi: 0x0000000000000006 rsi: 0x0000000000000001 rbp: 0x00007ff7b62013c0 rsp: 0x00007ff7b6201378 r8: 0x00007ff7b62013f0 r9: 0x0000000000000000 r10: 0x00000000000000f2 r11: 0x0000000000000246 r12: 0x00000000000000f2 r13: 0x00007ff7b62017f0 r14: 0x0000000000000001 r15: 0x0000000000000006 rip: 0x000000011192298e rfl: 0x0000000000000246 cr2: 0x000000010cfd2936

Logical CPU: 0 Error Code: 0x02000209 Trap Number: 133

Binary Images: 0x1118dc000 - 0x111947fff dyld () <f71fb3ca-5fcc-3577-9457-b047888a46d1> /usr/lib/dyld 0x10cfcb000 - 0x10d018fff dyld_sim () <7276a69b-e3b9-3f23-957f-061350a501b4> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim

EOF


Full Report

{“app_name”:“testproject”,“timestamp”:“2022-09-06 14:53:36.00 +0300”,“app_version”:“1.0”,“slice_uuid”:“fc94d75e-c756-329b-b797-552f61806eb0”,“build_version”:“1”,“platform”:7,“bundleID”:“org.reactjs.native.example.testproject”,“share_with_app_devs”:0,“is_first_party”:0,“bug_type”:“309”,“os_version”:“macOS 12.5.1 (21G83)”,“incident_id”:“B813BAD6-A8CA-4003-B965-6FE4733EC654”,“name”:“testproject”} { “uptime” : 260000, “procLaunch” : “2022-09-06 14:53:35.0415 +0300”, “procRole” : “Foreground”, “version” : 2, “userID” : 501, “deployVersion” : 210, “modelCode” : “MacBookPro16,1”, “procStartAbsTime” : 267874854474379, “coalitionID” : 31205, “osVersion” : { “train” : “macOS 12.5.1”, “build” : “21G83”, “releaseType” : “User” }, “captureTime” : “2022-09-06 14:53:35.0726 +0300”, “incident” : “B813BAD6-A8CA-4003-B965-6FE4733EC654”, “bug_type” : “309”, “pid” : 10096, “procExitAbsTime” : 267874882079016, “cpuType” : “X86-64”, “procName” : “testproject”, “procPath” : “/Users/USER/Library/Developer/CoreSimulator/Devices/5ECF7949-51A1-4E17-B4CE-E7186750E864/data/Containers/Bundle/Application/5089FB61-ED38-4EA9-B58F-6395012D6D83/testproject.app/testproject”, “bundleInfo” : {“CFBundleShortVersionString”:“1.0”,“CFBundleVersion”:“1”,“CFBundleIdentifier”:“org.reactjs.native.example.testproject”}, “storeInfo” : {“deviceIdentifierForVendor”:“28A0FF8E-0D5D-5562-9A29-B4461B2CCBD9”,“thirdParty”:true}, “parentProc” : “launchd_sim”, “parentPid” : 7524, “coalitionName” : “com.apple.CoreSimulator.SimDevice.5ECF7949-51A1-4E17-B4CE-E7186750E864”, “crashReporterKey” : “6FE47381-36D7-18B0-B222-F84F8B90D961”, “responsiblePid” : 3271, “responsibleProc” : “SimulatorTrampoline”, “wakeTime” : 1914, “bridgeVersion” : {“build”:“19P6066”,“train”:“6.6”}, “sleepWakeUUID” : “E9160E8F-12B5-448F-8AC0-AFA83A735033”, “sip” : “enabled”, “isCorpse” : 1, “exception” : {“codes”:“0x0000000000000000, 0x0000000000000000”,“rawCodes”:[0,0],“type”:“EXC_CRASH”,“signal”:“SIGABRT”}, “termination” : {“code”:1,“flags”:518,“namespace”:“DYLD”,“indicator”:“Library missing”,“details”:[“(terminated at launch; ignore backtrace)”],“reasons”:[“Library not loaded: @rpath/hermes.framework/hermes”,“Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/5ECF7949-51A1-4E17-B4CE-E7186750E864/data/Containers/Bundle/Application/5089FB61-ED38-4EA9-B58F-6395012D6D83/testproject.app/testproject”,“Reason: tried: ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/hermes.framework/hermes’ (no such file), ‘/usr/lib/swift/hermes.framework/hermes’ (no such file), '/Users/bayram/Library/Developer/CoreSimulator/Devices/5ECF7949-51A1-4E17-B4CE-E7186750E864/data/Containers/Bundle/Application/5089FB61-ED38-4EA9-B58F-6395012D6D83/testproject.app/Frame”]}, “extMods” : {“caller”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“system”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“targeted”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“warnings”:0}, “faultingThread” : 0, “threads” : [{“triggered”:true,“id”:2617499,“threadState”:{“r13”:{“value”:140701889206256},“rax”:{“value”:33554953},“rflags”:{“value”:582},“cpu”:{“value”:0},“r14”:{“value”:1},“rsi”:{“value”:1},“r8”:{“value”:140701889205232},“cr2”:{“value”:4512885046},“rdx”:{“value”:140701889206256},“r10”:{“value”:242},“r9”:{“value”:0},“r15”:{“value”:6},“rbx”:{“value”:0},“trap”:{“value”:133},“err”:{“value”:33554953},“r11”:{“value”:582},“rip”:{“value”:4589758862,“matchesCrashFrame”:1},“rbp”:{“value”:140701889205184},“rsp”:{“value”:140701889205112},“r12”:{“value”:242},“rcx”:{“value”:140701889205112},“flavor”:“x86_THREAD_STATE”,“rdi”:{“value”:6}},“frames”:[{“imageOffset”:289166,“symbol”:“__abort_with_payload”,“symbolLocation”:10,“imageIndex”:0},{“imageOffset”:379506,“symbol”:“abort_with_payload_wrapper_internal”,“symbolLocation”:80,“imageIndex”:0},{“imageOffset”:379556,“symbol”:“abort_with_payload”,“symbolLocation”:9,“imageIndex”:0},{“imageOffset”:284907,“symbol”:“abort_with_payload”,“symbolLocation”:26,“imageIndex”:1},{“imageOffset”:21739,“symbol”:“dyld4::halt(char const*)”,“symbolLocation”:375,“imageIndex”:1},{“imageOffset”:7196,“symbol”:“dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)”,“symbolLocation”:3070,“imageIndex”:1},{“imageOffset”:7746,“symbol”:“_dyld_sim_prepare”,“symbolLocation”:379,“imageIndex”:1},{“imageOffset”:27512,“symbol”:“dyld4::prepareSim(dyld4::RuntimeState&, char const*)”,“symbolLocation”:1265,“imageIndex”:0},{“imageOffset”:22286,“symbol”:“dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)”,“symbolLocation”:244,“imageIndex”:0},{“imageOffset”:21732,“symbol”:“start”,“symbolLocation”:388,“imageIndex”:0}]}], “usedImages” : [ { “source” : “P”, “arch” : “x86_64”, “base” : 4589469696, “size” : 442368, “uuid” : “f71fb3ca-5fcc-3577-9457-b047888a46d1”, “path” : “/usr/lib/dyld”, “name” : “dyld” }, { “source” : “P”, “arch” : “x86_64”, “base” : 4512854016, “size” : 319488, “uuid” : “7276a69b-e3b9-3f23-957f-061350a501b4”, “path” : “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim”, “name” : “dyld_sim” } ], “sharedCache” : { “base” : 140733730258944, “size” : 3268706304, “uuid” : “0316ba73-5fae-3838-872d-56c53ca997ff” }, “vmSummary” : “ReadOnly portion of Libraries: Total=604.6M resident=0K(0%) swapped_out_or_unallocated=604.6M(100%)\nWritable regions: Total=10.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=10.7M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8192K 1 \nVM_ALLOCATE 12K 3 \n__DATA 2124K 15 \n__DATA_CONST 1149K 10 \n__LINKEDIT 559.1M 9 \n__TEXT 45.5M 15 \ndyld private memory 2048K 2 \n=========== ======= ======= \nTOTAL 673.8M 56 \n”, “legacyInfo” : { “threadTriggered” : {

} }, “trialInfo” : { “rollouts” : [ { “rolloutId” : “5fb4245a1bbfe8005e33a1e1”, “factorPackIds” : {

  },
  "deploymentId" : 240000015
},
{
  "rolloutId" : "60f8ddccefea4203d95cbeef",
  "factorPackIds" : {

  },
  "deploymentId" : 240000019
}

], “experiments” : [

] } }

Model: MacBookPro16,1, BootROM 1731.140.2.0.0 (iBridge: 19.16.16066.0.0,0), 8 processors, 8-Core Intel Core i9, 2,3 GHz, 16 GB, SMC Graphics: Intel UHD Graphics 630, Intel UHD Graphics 630, Built-In Display: Color LCD, 3072 x 1920 Retina, Main, MirrorOff, Online Graphics: AMD Radeon Pro 5500M, AMD Radeon Pro 5500M, PCIe, 4 GB Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2667 MHz, SK Hynix, HMA81GS6CJR8N-VK Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2667 MHz, SK Hynix, HMA81GS6CJR8N-VK AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x7BF), wl0: Jul 12 2021 18:02:56 version 9.30.464.0.32.5.76 FWID 01-c081cfed Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: USB 10/100/1000 LAN, Ethernet, en7 Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: T2Bus USB Device: composite_device USB Device: Touch Bar Backlight USB Device: Touch Bar Display USB Device: Apple Internal Keyboard / Trackpad USB Device: Headset USB Device: Ambient Light Sensor USB Device: FaceTime HD Camera (Built-in) USB Device: Apple T2 Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5 Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5 `

Version

0.70

Output of npx react-native info

System:
    OS: macOS 12.5.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 1.67 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.20.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 6.14.17 - /usr/local/bin/npm
    Watchman: 2022.07.04.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 29, 30, 31
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64
      Android NDK: 22.1.7171670
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.0 => 0.70.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

just run npx react-native init testproject then cd testproject && npx react-native run-ios

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

https://user-images.githubusercontent.com/44513402/188628441-e57b8824-ac03-4fe7-9b5e-2ed07a6e3ca1.mp4

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 10
  • Comments: 69 (12 by maintainers)

Most upvoted comments

I solved it by addinghermes.xcframework file to

xcode > build phases > Link binary with Libraries section and rebuilding the app

Temporary fix:

change highlighted area with:

Ekran Resmi 2022-09-07 15 44 59
if [[ "$CONFIGURATION" == "Debug" ]]; then
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"
fi

DO NOT RUN POD INSTALL

just npx react-native run-ios this should solve the issue but im looking to find out why pod install doesnt add this automatically…

In case anyone needs a summary of this thread, this problem seems to be a result of version mismatches across a few possible places.

So, based on comments on this issue and other places, here are the steps I took to fix the error:

  1. Install the version of Ruby listed in the Gemfile and .ruby-version
  2. Install correct version of CocoaPods using bundle install
  3. Update the CocoaPods repo using bundle exec pod repo update
  4. Install pods with bundle exec pod install

I also made a blog post about it if you’d like more details: https://traviswimer.com/blog/cocoapods-could-not-find-compatible-versions-for-pod-hermes-engine/


If you’re on an older version of React Native <0.67.0, it will not include a Gemfile, so the process will be different (and may have some issues)

  1. Upgrade Ruby to the desired version. (Ruby 2.7.4 is the version initially used in RN 0.67.0)
  2. Upgrade CocoaPods to the latest version: gem install cocoapods
  3. Update the CocoaPods repo pod repo update
  4. Delete Podfile.lock
  5. Run pod install

Ok, so it seems that the problem is with the Ruby version and how the pod are installed. Thank you for the test.

The new setup that we are going to support is the one with Ruby 2.7.5 and bundler. This will make it easier to handle the iOS dependencies in the long run.

note this is not the default version or ruby for Mac OSX 12.5.1.

Yes, we know. However, it is not a good practice to rely on the Mac OS default ruby version. There are plenty of articles online that explain why. Our suggestion is to install a Ruby version manager like RBEnv and let it manage the dependencies for you.

Bundler is an helpful way to handle ruby dependencies and make sure that everyone have the same experience. Going forward, the suggested way to install the pods will always be by using bundle exec pod install. Note that bundle install has to run only once.

Whats the next step to debug this ? reinstall cocoapods ?

Sorry, I don’t understand. What do you mean? What do you want to achieve with the “next steps”?

Next steps

To improve the experience for everyone, we are going to:

  1. Improve the website documentation explaining this
  2. Update the CLI to run some of these tasks automatically. Specifically:
    1. check the Ruby version
    2. run bundle install
    3. run bundle exec pod install

Does this sound good?

hermes.xcframework

Where did u get hermes.xcframework?

just press to + sign and search for hermes

Ekran Resmi 2022-09-07 13 59 28

image

lmao

For those still struggling with this, I found that I needed to have CocoaPods v 1.11.2 or higher for it to work correctly.

Thanks @brandonmoon but i’m on the most recent version 1.11.3, still with this issue

Hi guys. Once you are migrating from previous RN version to latest one (for example RN v0.70+) you just need additionally run this in ios folder:

pod update hermes-engine --no-repo-update

Sometimes pod install not installing the new hermes engine correctly. Once you done this, clean and rebuild project app is opening correctly.

If you run this command you can find this diff in Podfile.lock: Screenshot 2022-11-28 at 21 26 10

Hi there! @traviswimer we decided to adopt bundle for Ruby as a measure to avoid fragmentation in the various versions of ruby and cocoapods for all our users.

Thanks to the Gemfile and the .ruby-version file, we can ensure that all the users on a given React Native version are all using the same versions of the common dependencies. In this way, we would be able to support every user more efficiently and in a more scalable way.

bundle exec will the the recommended way to install the dependencies for iOS. By using it, we can safely exclude a whole set of configuration problems. The newer version of the CLI will use bundler by default. And we have plans to upgrade the doctor command with similar checks.

I hope this can shed more light on how we would like to handle dependencies and configurations from now on. The rationale is that it should simplify the management in the long run.

I created this function so you don’t have to manually update the Pods frameworks file every time you run pod install

def fix_hermes(app_name)
  path = "Pods/Target Support Files/Pods-" + app_name + "/Pods-" + app_name + "-frameworks.sh"
  lines = File.readlines(path)
  lines.insert(181, '  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"'+"\n")
  lines.insert(183, 'if [[ "$CONFIGURATION" == "Release" ]]; then'+"\n")
  lines.insert(184, '  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"'+"\n")
  lines.insert(185, "fi\n")
  File.write(path, lines.join, mode: "w")
  puts "Hermes fixed"
end

Add it to you Podfile. It should look like this:

image

And finally call it from the post install script

image

app_name is the target

Just disable hermes in podfile

:hermes_enabled => flags[:false],

Temporary fix:

change highlighted area with:

Ekran Resmi 2022-09-07 15 44 59
if [[ "$CONFIGURATION" == "Debug" ]]; then
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"
fi

DO NOT RUN POD INSTALL

just npx react-native run-ios this should solve the issue but im looking to find out why pod install doesnt add this automatically…

It works on my side

hermes.xcframework

Where did u get hermes.xcframework?

Upgrading to Cocoapods 1.11.3 did the trick for me as well. Thanks @brandonmoon and all

anyone know which step i’ve missed?

Screenshot 2022-10-24 at 22 30 54

Same error in react-native 0.71.2

@ddikodroid Did you find a solution? I am facing the same issue. For new projects it works fine, but for these that are using RN < 0.70.x it doesn’t.

Hi everyone, I just tried to repro this without success.

What I noticed is that I already have these lines in my

if [[ "$CONFIGURATION" == "Debug" ]]; then
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework"
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
  install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"
fi

in my Pods-testproject-frameworks.sh script, that are the ones that fixes the issues, as suggested here.

After a quick search in the codebase, we don’t add those lines in any script, therefore it is something Cocoapods does. To me, it looks like a corrupted pod install, either something happened and the error was silenced or there is some other misconfiguration going on.

I checked the Cocoapods version and we are both on 1.11.3.

A few clarifying questions:

  1. Which version of Ruby are you using?
  2. Have you tried to do the npx react-native init testproject && cd testproject && npx react-native run-ios steps more than once?
  3. Could you try these steps, please?
    1. npx react-native init testproject --skip-install
    2. cd testproject
    3. yarn install
    4. cd ios
    5. bundle install
    6. bundle exec pod install

For those still struggling with this, I found that I needed to have CocoaPods v 1.11.2 or higher for it to work correctly.

Updating cocoapods to the latest version solved this issue for me! (just had to run sudo gem install cocoapods and check that pod --version was 1.15.x)

After upgrading React Native to 0.73.2, I did the following steps and it worked.

Update cocoapods to 1.13.0 and make sure the activesupport is under 7.1.0 in Gemfile.

Gemfile

gem 'cocoapods', '1.13.0'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

Update gem.

bundle update cocoapods activesupport

Next, install pod.

bundle exec pod install

After installation, one script phase of hermes-engine will be added as follows.

[!] hermes-engine has added 1 script phase. Please inspect before executing a build. See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information.

Build it and working.

I did solve my problem, but I do not think it was related to the hermes engine afterall. I believe that my issue was related to expo specifically (now that I have gotten it to work). restarted my exploration from an earlier commit and followed the expo 47 documentation reading the entire thing and paying particularly close attention to the section on Bare Workflow. I then found an expo bare minimum template for expo 47 on their GitHub repository and verified several files based on it. I also allowed the expo-cli to upgrade expo in my project. after that I double checked react-native dependencies using the React Native Upgrade Helper Tool. Finally I found that expo can build my project using npx expo run:ios instead of using npx react-native run-ios and I think this was maybe one of the biggest pieces of the puzzle.

I hope that this helps anyone else in the future. though again, I’d like to state that I think my particular problem and solution might be unrelated to hermes.

@anisamirouche That is only one part of the issue though. Did you ensure the version in the Gemfile is correct for your version of RN and run all the bundle commands listed in my other comment?

Thanks for your answer, how can I know which version of ruby is needed for react native 0.71.2 ?

After hours of investigation I finally figured out what was the problem. The first part is related to upgrading to react-native 0.70.x and uprgading cocoapods via sudo gem install cocoapods. I’ve also configured ruby version to 2.7.5 via rbenv but not sure if this helped since I was getting the error even after upgrade. Only after sudo gem install cocoapods it disappeared.

After this I was able to do pod install but still getting the message Failed to load configuration of your project. Than I found leftover in react-native.config.js for the library I was not using anymore. After removing this configuration it started to work normally. Interestingly, I didn’t get this error with 0.69.x although I didn’t use this library as well. Hope someone will find this useful.

@ddikodroid The problem you are facing is that React Native is using the system version while your folder is using something else. My suggestion would be to install a proper Ruby Version Manager as we suggest here. In the section: React Native CLI Quickstart/MacOS/iOS, we added some references to how to properly set up your ruby environment.

i’ve installed rbenv, but still encountering that problem.

but, eventhough the error appears, i’m able to run the project succesfully but executing

bundle install
cd ios && bundle exec pod install

Hi @cipolleschi, thank you. Tagging @kelset

First note, received an error when running bundle install which I haven’t seen before

Your Ruby version is 2.6.8, but your Gemfile specified 2.7.5

This also corresponds with the .ruby-version 2.7.5 - just to note this is not the default version or ruby for Mac OSX 12.5.1.

After updating ruby to 2.7.5, using the commands below did work with the inclusion of hermes.framework, the app compiled and ran fine.

bundle install
bundle exec pod install

However… clearing ios/Pods and then using just pod install does not work.

Also applied the above against my upgraded project 0.68.2 -> 0.70.0 and that now works as well with these commands…

Whats the next step to debug this ? reinstall cocoapods ?

It’s not that, I just tested on my intel machine and it also works just fine:

System:
    OS: macOS 12.5
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 39.34 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
    Watchman: 2022.07.04.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/lsciandra/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      Android NDK: 21.4.7075529
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14 - /Users/lsciandra/.sdkman/candidates/java/current/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.0 => 0.70.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not FoundScreenshot 2022-09-13 at 15.23.16.png

screenshot:

unnamed