Skip to content
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

Error installing hermes-engine on new install (0.73.2) #42697

Closed
nikodraca opened this issue Jan 28, 2024 · 21 comments
Closed

Error installing hermes-engine on new install (0.73.2) #42697

nikodraca opened this issue Jan 28, 2024 · 21 comments

Comments

@nikodraca
Copy link

Description

This is brand new install following the RN development guide. The error code is not giving a lot of context even with verbose flag.

Steps to reproduce

  1. cd ios
  2. bundle install
  3. bundle exec pod install --verbose

React Native Version

0.7.32

Affected Platforms

Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 521.81 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.2
    path: ~/.nvm/versions/node/v18.18.2/bin/node
  Yarn:
    version: 1.22.21
    path: ~/.nvm/versions/node/v18.18.2/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.2/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.2
    path: /opt/homebrew/opt/openjdk/bin/javac
  Ruby:
    version: 3.2.1
    path: /Users/nikodraca/.rvm/rubies/ruby-3.2.1/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.2
    wanted: 0.73.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

### Command


/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.15.0
        Ruby : ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin23]
    RubyGems : 3.4.6
        Host : macOS 14.2.1 (23C71)
       Xcode : 15.2 (15C500b)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

Resolve react_native_pods.rb with node to allow for hoisting

require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', dir]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

If you are using a react-native-flipper your iOS build will fail when NO_FLIPPER=1 is set.

because react-native-flipper depends on (FlipperKit,...) that will be excluded

To fix this you can also exclude react-native-flipper using a react-native.config.js

```js

module.exports = {

dependencies: {

...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),

```

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end

target 'fitcheq' do
config = use_native_modules!

use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

target 'fitcheqTests' do
inherit! :complete
# Pods for testing
end

post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
end
end


### Error

Errno::EEXIST - File exists @ syserr_fail2_in - /Users/nikodraca/Library/Caches/CocoaPods/Pods/External/hermes-engine/6ef44e4a609ea85b35328bf8b605bebb-b361c/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2266:in symlink' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2266:in copy'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:1058:in block in copy_entry' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2397:in wrap_traverse'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2400:in block in wrap_traverse' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2399:in each'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2399:in wrap_traverse' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:1055:in copy_entry'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:1000:in block in cp_r' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2481:in block in fu_each_src_dest'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2490:in block in fu_each_src_dest0' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2488:in each'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2488:in fu_each_src_dest0' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:2479:in fu_each_src_dest'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:999:in cp_r' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in block (2 levels) in copy_files'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in each' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in block in copy_files'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in lock' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in write_lock'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in copy_files' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in block (2 levels) in uncached_pod'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in each' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in block in uncached_pod'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in in_tmpdir' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in uncached_pod'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in download_pod' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in download'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in download!' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in download_source'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in install!' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in install_source_of_pod'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in block (2 levels) in install_pod_sources' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in titled_section'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in block in install_pod_sources' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in each'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in install_pod_sources' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in block in download_dependencies'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in section' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in download_dependencies'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in install!' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in run'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in run'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.0/bin/pod:55:in <top (required)>' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/bin/pod:25:in load'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/bin/pod:25:in <top (required)>' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in load'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in kernel_load' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in run'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in exec' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in dispatch'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in dispatch' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in start'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in start' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/exe/bundle:46:in block in <top (required)>'
/Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in with_friendly_errors' /Users/nikodraca/Documents/Projects/fitcheq/vendor/bundle/ruby/3.2.0/gems/bundler-2.1.4/exe/bundle:34:in <top (required)>'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/bin/bundle:25:in load' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/bin/bundle:25:in

'
/Users/nikodraca/.rvm/rubies/ruby-3.2.1/bin/ruby_executable_hooks:22:in eval' /Users/nikodraca/.rvm/rubies/ruby-3.2.1/bin/ruby_executable_hooks:22:in '



### Reproducer

https://github.com/nikodraca/fitcheq

### Screenshots and Videos

_No response_
Copy link

⚠️ Too Old Version of React Native
ℹ️ It looks like your issue or the example you provided uses a Too Old Version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@nikodraca
Copy link
Author

Accidentally wrote the wrong RN version... re-uploading now, please disregard

@DorianMazur
Copy link

I have the same isse

@RodrigoSarmento
Copy link

It just happened with me as well after upgrading to 0.73.2. I have firebase linked, hermes and flipper enabled

@0xprincedev
Copy link

I am getting the same error, I am using react-native@0.72.6

@ilaiadaya
Copy link

same

@nitipat21
Copy link

same error with react-native@0.72.6

@joseprakash1990
Copy link

Same here. Reopen this issue.

@fahrulalwan
Copy link

same issue happening here

@CyrilMazur
Copy link

Same issue

@jamesbtlr
Copy link

jamesbtlr commented Jan 31, 2024

Same here, also having this issue with 0.73.2

@bashilApsi
Copy link

Same issue facing after upgrading the version 0.73.1

@mjosipovic
Copy link

Same issue while upgrading to 0.73.2

@GauravKumar-Dev
Copy link

Same issue happening on v0.73.3 and v0.72.4

@mjosipovic
Copy link

This issue is related to #42698. According to some comments from that issue, the workaround which helped me to solve this problem is to do the following:
gem install cocoapods -v 1.14.3

modify the Gemfile and set the CocoaPods version to 1.14
gem 'cocoapods', '1.14'

@bashilApsi
Copy link

Same issue facing after upgrading the version 0.73.1

fixed this issue

-> Solution
cd ios
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.14.3
pod install
npm run ios

@bpingris
Copy link

how should we proceed if we are using a managed workflow (ie no ios or android folder)? I tried to set the cocoapods version in my eas.json

			"ios": {
				"cocoapods": "1.14.3"
			}

it did not change anything

@TarasOP
Copy link

TarasOP commented Jan 31, 2024

@bpingris try to change it in ios/Gemfile, than run bundle install in ios folder

@RodrigoSarmento
Copy link

I uninstalled my cocoapods and installed the 1.14.3 version and I can confirm it is working

@rossporteous118
Copy link

I don't think there is a gem file with the managed work flow. I have Cocoapods 1.14.3 installed but whenever I run "npx expo run:ios" it begins installing the latest Cocoapods version

@cipolleschi
Copy link
Contributor

cipolleschi commented Jan 31, 2024

Please refer to the pinned issue: #42698

To summarise:

  • React Native 0.73 has been patched. Please update to 0.73.3 and you should not face the issue anymore.
  • React Native 0.72 and 0.71 are in the process of being released. To unblock you, you can modify the Gemfile with this change: 3869ae4
  • Expo does not ship a Gemfile. If you are an Expo user, refer to this answer

@facebook facebook locked as resolved and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests