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

New error when installing pods in 1.15: File exists @ syserr_fail2_in #12226

Closed
TuvshinbayarO opened this issue Jan 29, 2024 · 23 comments · Fixed by #12229 or argyle-systems/argyle-link-react-native#102
Milestone

Comments

@TuvshinbayarO
Copy link

⚠️ Something went wrong running pod install in the ios directory.
Command pod install failed.
└─ Cause: Error installing hermes-engine

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod install --repo-update --ansi

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.15.0
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
    RubyGems : 3.5.4
        Host : macOS 14.2.1 (23C71)
       Xcode : 15.2 (15C500b)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.0/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

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")

require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}

ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']

platform :ios, podfile_properties['ios.deploymentTarget'] || '13.4'
install! 'cocoapods',
  :deterministic_uuids => false

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,...), which will be excluded. To fix this,
# you can also exclude `react-native-flipper` in `react-native.config.js`
#
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
#   }
# }
# ```
flipper_config = FlipperConfiguration.disabled
if ENV['NO_FLIPPER'] == '1' then
  # Explicitly disabled through environment variables
  flipper_config = FlipperConfiguration.disabled
elsif podfile_properties.key?('ios.flipper') then
  # Configure Flipper in Podfile.properties.json
  if podfile_properties['ios.flipper'] == 'true' then
    flipper_config = FlipperConfiguration.enabled(["Debug", "Release"])
  elsif podfile_properties['ios.flipper'] != 'false' then
    flipper_config = FlipperConfiguration.enabled(["Debug", "Release"], { 'Flipper' => podfile_properties['ios.flipper'] })
  end
end

target 'StickerSmash' do
  use_expo_modules!
  config = use_native_modules!

  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
  use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/..",
    # Note that if you have use_frameworks! enabled, Flipper will not work if enabled
    :flipper_configuration => flipper_config
  )

  post_install do |installer|
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )

    # This is necessary for Xcode 14, because it signs resource bundles by default
    # when building for devices.
    installer.target_installation_results.pod_target_installation_results
      .each do |pod_name, target_installation_result|
      target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
        resource_bundle_target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end
  end

  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end
end

Error

Errno::EEXIST - File exists @ syserr_fail2_in - /Users/tuvshinbayar/Library/Caches/CocoaPods/Pods/External/hermes-engine/6ef44e4a609ea85b35328bf8b605bebb-b361c/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2254:in `symlink'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2254:in `copy'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1048:in `block in copy_entry'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2385:in `wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2388:in `block in wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2387:in `each'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2387:in `wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1045:in `copy_entry'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:990:in `block in cp_r'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2469:in `block in fu_each_src_dest'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2478:in `block in fu_each_src_dest0'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `each'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `fu_each_src_dest0'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2467:in `fu_each_src_dest'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:989:in `cp_r'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `each'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `block in copy_files'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in `lock'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in `copy_files'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in `block (2 levels) in uncached_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `each'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `block in uncached_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in `in_tmpdir'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in `download'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `each'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in `download_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in `install!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

@orta orta changed the title can't install Cocoapods pods New error when installing pods in 1.15: File exists @ syserr_fail2_in Jan 29, 2024
@UrbanChrisy
Copy link

Same issue here, literally have changed nothing and was working fine before.

@UrbanChrisy
Copy link

Solved by downgrading cocoapods.

  1. sudo gem uninstall cocoapods
  2. sudo gem install cocoapods -v 1.14.3

FYI: @TuvshinbayarO

@cashwalk-bzjoowan
Copy link

cashwalk-bzjoowan commented Jan 30, 2024

Please resolve it quickly. Locally can use downgrade cocoapod, but it continues to fail in xcodecloud

@mandeerson
Copy link

mandeerson commented Jan 30, 2024

You can create an post_clone script like this to solve Xcode Cloud build


#!/bin/zsh

echo "===== Installling CocoaPods ====="
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/1364b74ebeedb2eab300d62c99e12f2a6f344277/Formula/c/cocoapods.rb > cocoapods.rb
brew install cocoapods.rb
echo "===== Installing Node.js ====="
brew install node@21
echo "===== Installing yarn ====="
brew install yarn

# Install dependencies
echo "===== Running yarn install ====="
yarn install
echo "===== Running pod install ====="
cd ios
pod install

@Sateesh7070
Copy link

Command

/Users/kodecorp/.rbenv/versions/3.2.2/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.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]
    RubyGems : 3.4.18
        Host : macOS 14.2.1 (23C71)
       Xcode : 15.2 (15C500b)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /Users/kodecorp/.rbenv/versions/3.2.2/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-clean       : 0.0.1
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 'lifesongs' 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 'lifesongsTests' 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/kodecorp/Library/Caches/CocoaPods/Pods/External/hermes-engine/dbb153605ad16ff6beffe23b95032e38-54205/destroot/Library/Frameworks/macosx/hermes.framework/Resources
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2266:in `symlink'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2266:in `copy'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:1058:in `block in copy_entry'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2397:in `wrap_traverse'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2400:in `block in wrap_traverse'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2399:in `each'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2399:in `wrap_traverse'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:1055:in `copy_entry'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:1000:in `block in cp_r'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2481:in `block in fu_each_src_dest'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2490:in `block in fu_each_src_dest0'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2488:in `each'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2488:in `fu_each_src_dest0'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:2479:in `fu_each_src_dest'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/3.2.0/fileutils.rb:999:in `cp_r'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `each'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `block in copy_files'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in `lock'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in `copy_files'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in `block (2 levels) in uncached_pod'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `each'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `block in uncached_pod'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in `in_tmpdir'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in `download'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `each'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in `download_dependencies'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in `install!'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in `run'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in `run'
/Users/kodecorp/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.0/bin/pod:55:in `<top (required)>'
/Users/kodecorp/.rbenv/versions/3.2.2/bin/pod:25:in `load'
/Users/kodecorp/.rbenv/versions/3.2.2/bin/pod:25:in `<main>'

@manjeetcars24
Copy link

Solved by downgrading cocoapods.

  1. sudo gem uninstall cocoapods
  2. sudo gem install cocoapods -v 1.14.3

FYI: @TuvshinbayarO

This helped quickly

@mustafa-boorenie
Copy link

Temporary workaround:

pod _1.14.3_ install

@ManzurSaiyed007
Copy link

Temporary workaround:

pod _1.14.3_ install

How to do it

@mustafa-boorenie
Copy link

mustafa-boorenie commented Feb 2, 2024

Temporary workaround:

pod _1.14.3_ install

How to do it

Steps:

1- update ruby using this guide:
https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/

2- cd ios
3- rm -rf build
4- rm -rf Pods
5- pod _1.14.3_ install

This is what worked for me.

@sgrowe
Copy link

sgrowe commented Feb 2, 2024

If you've installed cocoapods via homebrew then the steps I followed to downgrade to 1.14.3 were

  • Uninstall version 1.15: brew uninstall cocoapods
  • Download this version of cocoapods.rb from github
  • Navigate to the folder you saved that file (e.g. cd ~/Downloads)
  • brew install using that downloaded file: brew install ./cocoapods.rb

Source: https://stackoverflow.com/questions/58373704/how-do-you-specify-a-version-using-brew-cask

@cortinico
Copy link

Hey all,
Nicola from the React Native team here,

Is someone from CocoaPods looking into this issue?
Do we have an ETA for 1.15.1?

@gg-hsi
Copy link

gg-hsi commented Feb 2, 2024

Solved by downgrading cocoapods.

  1. sudo gem uninstall cocoapods
  2. sudo gem install cocoapods -v 1.14.3

FYI: @TuvshinbayarO

you also need to avoid ruby v3
v2.7.6 did the job for me.
Thanks for the tip.

@eeeeman22
Copy link

If you've installed cocoapods via homebrew then the steps I followed to downgrade to 1.14.3 were

  • Uninstall version 1.15: brew uninstall cocoapods
  • Download this version of cocoapods.rb from github
  • Navigate to the folder you saved that file (e.g. cd ~/Downloads)
  • brew install using that downloaded file: brew install ./cocoapods.rb

Source: https://stackoverflow.com/questions/58373704/how-do-you-specify-a-version-using-brew-cask

Thank you so much, this worked for me! Was getting an error specifically from installing hermes-engine.

Env details:

  • react-native .72.6
  • expo 49.0.22
  • Cocoapods 1.15.0
  • node 18.14.0
  • ruby 3.1.4
  • Developing on an M1 Macbook Pro
Errno::EEXIST - File exists @ syserr_fail2_in - /Users/[redacted]/Library/Caches/CocoaPods/Pods/External/hermes-engine/c6ab6b88cdc497206edd68307197fa66-8057e/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources

@SohelIslamImran
Copy link

Same issue

@Chaseshaw
Copy link

same issue, same error. ruby 3.3.0 and cocoapods 1.15.0.

@paulb777
Copy link
Member

paulb777 commented Feb 6, 2024

Fixed in 1.15.2

@gaffneyd4
Copy link

Updating to the latest release fixed this problem for me 🎉 🚀

brew update
brew install cocoapods

Here is my error report from before updating just to add to the discussion:

Command

/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod install

Report

Stack

   CocoaPods : 1.15.0
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
    RubyGems : 3.5.4
        Host : macOS 14.3 (23D56)
       Xcode : 15.2 (15C500b)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.0/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

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

# Note: it was 13.4 to get @react-native-community/datetimepicker to work but
# it's probably not necessary actually. Just needed to upgrade XCode.
#
# 2021-11-04: Set to 13.0 because it crashes with 12.x
# https://github.com/laurent22/joplin/issues/5671
#
# 2021-12-17: Changed back to 11.0 because after the fix it works with at least
# 12.x, and probably 11.0 too, which is the version supported by React Native.
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 'Joplin' do
  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.

    # 2023/05/07: Leave that to `false` for now because Hermes is rubbish at
    # reporting errors, which it makes it impossible to investigate crashes.
    :hermes_enabled => flags[:hermes_enabled],
    :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 => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  pod 'JoplinRNShareExtension', :path => 'ShareExtension'

  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

target 'ShareExtension' do
  pod 'JoplinCommonShareExtension', :path => 'ShareExtension'
end

Error

Errno::EEXIST - File exists @ syserr_fail2_in - /Users/derek/Library/Caches/CocoaPods/Pods/External/hermes-engine/eb374ea21fab85daf9070fd1a45bcf1c-d2760/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2254:in `symlink'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2254:in `copy'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1048:in `block in copy_entry'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2385:in `wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2388:in `block in wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2387:in `each'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2387:in `wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1045:in `copy_entry'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:990:in `block in cp_r'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2469:in `block in fu_each_src_dest'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2478:in `block in fu_each_src_dest0'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `each'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `fu_each_src_dest0'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2467:in `fu_each_src_dest'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:989:in `cp_r'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `each'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `block in copy_files'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in `lock'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in `copy_files'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in `block (2 levels) in uncached_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `each'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `block in uncached_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in `in_tmpdir'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in `download'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `each'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in `download_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in `install!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `<main>'

@gregavola
Copy link

How can I fix this for AppCenter?

@olbesp
Copy link

olbesp commented Feb 17, 2024

How can I fix this for AppCenter?

@gregavola try this: https://stackoverflow.com/a/77997455
It helped me. I only added the --force flag to make it work

sudo gem uninstall cocoapods --all --force

@brianmriley
Copy link

I had this issue in my GitHub action build for my RN iOS build and found this in another thread and it worked for me:

  # CocoaPods version 1.15.0 has incompatibilities with React Native
  # https://github.com/facebook/react-native/issues/42698
  # https://github.com/expo/expo/issues/26828
  # https://github.com/CocoaPods/CocoaPods/issues/12226
  - name: Upgrade CocoaPods to version 1.15.2
    run: |
      gem uninstall cocoapods --ignore-dependencies
      gem install cocoapods -v 1.15.2

Credit to @karlhorky facebook/react-native#42698 (comment)

m-bert added a commit to software-mansion/react-native-gesture-handler that referenced this issue Feb 20, 2024
## Description

Our CI fails on iOS build because of hermes-engine pod. This was fixed in cocapods 1.15.2 ([link](CocoaPods/CocoaPods#12226 (comment))), but our currently CI uses 1.15.0. This PR bumps version to 1.15.2

## Test plan

Tested on `nestedTaps` PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet