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

CocoaPods 1.15.0 : File exists @ syserr_fail2_in Error - Workaround available #42698

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

Comments

@nikodraca
Copy link

nikodraca commented Jan 28, 2024

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.73.2

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

/.../vendor/bundle/ruby/3.2.0/bin/pod install

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`
# 
# 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 `<main>'
/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 `<main>'

Reproducer

https://github.com/nikodraca/fitcheq

Screenshots and Videos

No response

@Tonmaiipc
Copy link

I'd like to report the same issue with additional info.

I've tried:

  • removing the hermes cache rm -rf /Users/user/Library/Caches/CocoaPods/Pods/External/hermes-engine/
  • reinstalling gem, ffi
  • tried both gem's and brew's CocoaPods

All yielded the same result.

Here is my setup,

Command

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

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

@diegopereiraeng
Copy link

same problem here:

Installing hermes-engine (0.73.2)

[!] Error installing hermes-engine

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

Command

/Users/anka/.rbenv/versions/3.1.4/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.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-darwin22]
    RubyGems : 3.4.12
        Host : macOS 13.3.1 (22E261)
       Xcode : 14.2 (14C18)
         Git : git version 2.40.0
Ruby lib dir : /Users/anka/.rbenv/versions/3.1.4/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!
# Prepare React Native project (if this method is defined in react_native_pods.rb)
prepare_react_native_project! if defined?(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 'HarnessReact' 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 'HarnessReactTests' 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/anka/Library/Caches/CocoaPods/Pods/External/hermes-engine/6ef44e4a609ea85b35328bf8b605bebb-b361c/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1370:in `symlink'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1370:in `copy'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:490:in `block in copy_entry'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1493:in `wrap_traverse'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1496:in `block in wrap_traverse'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1495:in `each'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1495:in `wrap_traverse'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:487:in `copy_entry'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:461:in `block in cp_r'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1577:in `block in fu_each_src_dest'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1586:in `block in fu_each_src_dest0'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1584:in `each'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1584:in `fu_each_src_dest0'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:1575:in `fu_each_src_dest'
/Users/anka/.rbenv/versions/3.1.4/lib/ruby/3.1.0/fileutils.rb:460:in `cp_r'

@allynsweet
Copy link

allynsweet commented Jan 29, 2024

I'm seeing this only happen when using CocoaPods 1.15.0, which was released 7 hours ago. Using CocoaPods 1.14 works without error for me.

It appears the stack traces posted here are all using 1.15.0 as well.

As a workaround, you could pin the CocoaPods version to the last stable release for 1.14 until it gets resolved for 1.15.
For gem:

gem install cocoapods -v 1.14.3

Or using brew (brew doesn't have version pinning for cocoapods):

curl https://raw.githubusercontent.com/Homebrew/homebrew-core/1364b74ebeedb2eab300d62c99e12f2a6f344277/Formula/c/cocoapods.rb > cocoapods.rb
brew install cocoapods.rb

@diegopereiraeng
Copy link

diegopereiraeng commented Jan 29, 2024

amazing, thank you very much, downgrading to 1.14 solved my problem.

gem install cocoapods -v 1.14.3

@edwin-nel
Copy link

Using @allynsweet solution, you can as another workaround, modify the Gemfile and set the CocoaPods version to 1.14

gem 'cocoapods', '1.14'

@rbndg
Copy link

rbndg commented Jan 29, 2024

I had this issue and downgrading cocoapods did work for me too

@kelset kelset pinned this issue Jan 29, 2024
@2xSamurai
Copy link

Same. Downgrading to 1.14 worked for me as well.

@kelset kelset changed the title Error installing hermes-engine on new install (0.73.2) #42697 CocoaPods 1.15.0 : File exists @ syserr_fail2_in Error - Workaround available Jan 29, 2024
@kelset kelset added the Platform: macOS Building on macOS. label Jan 29, 2024
@cipolleschi
Copy link
Contributor

Someone already opened an issue in the Cocoapods repo: CocoaPods/CocoaPods#12226

The workaround, so far, is to downgrade to Cocoapods 1.14.

blakef added a commit that referenced this issue Jan 29, 2024
Summary:
Users aren't able to build (#42698). We're restricting the version to known
good version of Cocoapods until the next release.

Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.
blakef added a commit that referenced this issue Jan 29, 2024
Summary:
Users aren't able to build (#42698). We're restricting the version to known
good version of Cocoapods until the next release.

Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.
facebook-github-bot pushed a commit that referenced this issue Jan 29, 2024
)

Summary:
Cocoapods 1.15 (#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

## Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: #42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd
@A320Peter
Copy link

Would you happen to know a quick temporary fix for Expo apps? I've had the same issue with an Expo app since the morning. Cannot build for iOS anymore. I don't know how to change the cocoapod version as reinstalling an older pod with brew has no effect. I deleted node_modules and ios folders. npm run ios always downloads the latest pod (currently 1.15.0) and the pod install fails with: Error installing hermes-engine. It's an M2 macbook, macOS Sonoma 14.3, Xcode 15.2.

blakef added a commit that referenced this issue Jan 29, 2024
)

Summary:
Cocoapods 1.15 (#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

[iOS][Fixed] don't allow cocoapods 1.15.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: #42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd
@frazahmedd
Copy link

Facing the same error after making the new react native project

huntie pushed a commit that referenced this issue Jan 29, 2024
)

Summary:
Cocoapods 1.15 (#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

## Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.
hurali97 added a commit that referenced this issue Jan 29, 2024
)

Summary:
Cocoapods 1.15 (#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.
[iOS][Fixed] don't allow cocoapods 1.15.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: #42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd
@Louis-C7
Copy link

Louis-C7 commented Jan 29, 2024

I already tried to downgrade cocopods as @allynsweet mentioned. But it turns out that it still using the 1.15 cocopads, does anyone know how to solve it?

pod --version
# 1.14.3

error info

...
### Stack

   CocoaPods : 1.15.0
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
    RubyGems : 3.5.4
        Host : macOS 14.1 (23B2073)
       Xcode : 15.2 (15C500b)
         Git : git version 2.43.0
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
...

@allynsweet
Copy link

@Louis-C7 @A320Peter It's hard to be sure without seeing more info, but check your Gemfile in the root of your project, does it say gem 'cocoapods', '1.15.0'?

If so, change this to read gem 'cocoapods', '1.14.3' and try again.

@mpanac
Copy link

mpanac commented Jan 29, 2024

Would you happen to know a quick temporary fix for Expo apps? I've had the same issue with an Expo app since the morning. Cannot build for iOS anymore. I don't know how to change the cocoapod version as reinstalling an older pod with brew has no effect. I deleted node_modules and ios folders. npm run ios always downloads the latest pod (currently 1.15.0) and the pod install fails with: Error installing hermes-engine. It's an M2 macbook, macOS Sonoma 14.3, Xcode 15.2.

Try - sudo gem uninstall cocoapods
it should prompt you to uninstall the version 1.15.0

@A320Peter
Copy link

I am new to RN, and I don't have a Gemfile in my project's folder; I am developing with Expo, and it's all handled automatically. I haven't installed cocoapods at all. When I run the command npm run ios to build it, it starts with installing Cocoapods. It always does. I never had to do anything else. This morning, this step failed with the abovementioned error, and I need help where I could specify which version of Cocoapod to install. Because the build script always downloads the latest version as it seems.

╰─ npm run ios                                                                                                                                                ─╯

> [email protected] ios
> expo run:ios

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

   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.43.0
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.0/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

@xiongxiongjiang
Copy link

boost/operators.hpp' file not found
boost/preprocessor/control/expr_iif.hpp' file not found

my MAC is M3 MAX and pod use 1.15.1 always report this...and finally 1.15.2 fixed

@bitcrumb
Copy link

bitcrumb commented Feb 7, 2024

Can confirm as well that 1.15.1 was still giving issues, but 1.15.2 fixed it for me as well.

@Keanu2431
Copy link

1.15.2 is the answer for me aswell

@glennweb
Copy link

glennweb commented Feb 14, 2024

How do you set the version of Cocoapods in a CI environment like AppCenter?

Or simply using RN 0.73.4 installs the latest Cocoapods? I am getting the build to work locally. But still failing in AppCenter?

Also I am actually using the latest 0.72.10 version locally and AppCenter. Do I need to upgrade to the 0.73... version to fix or have other minor versions been patched?

@mauricioalexandres
Copy link

mauricioalexandres commented Feb 14, 2024

@glennweb I had the same problem with AppCenter builds. I solved it by creating a file named 'appcenter-pre-build.sh' in the root project folder.

Its contents are like this:

#!/bin/bash

cd ${APPCENTER_SOURCE_DIRECTORY}

echo "Uninstalling all CocoaPods versions..."
gem uninstall --all --executables cocoapods

echo "Installing CocoaPods version 1.15.2..."
gem install cocoapods -v 1.15.2

ThibaultBee added a commit to apivideo/api.video-reactnative-uploader that referenced this issue Feb 15, 2024
…_fail2_in

The reason for the issue seems to be a bug in cocoapods < 15.2
See facebook/react-native#42698
tboba added a commit to software-mansion/react-native-screens that referenced this issue Feb 16, 2024
## Description

Because of the bug with Cocoapods, our CIs are failing on the cached
dependencies. This issue has been fixed in React Native 0.73.3 already,
but this version requires us to update Cocoapods version. This PR
updates our example projects to 0.73.4 version (which is the newest at
the moment) and updates the version of Cocoapods.
You can read more about the problem
[here](facebook/react-native#42698).

## Changes

- Updated examples that are matching 0.73 version to 0.73.4
- Updated Cocoapods version pattern in Gemfiles

## Checklist

- [x] Ensured that CI passes
ThibaultBee added a commit to apivideo/api.video-reactnative-live-stream that referenced this issue Feb 16, 2024
…_fail2_in

The reason for the issue seems to be a bug in cocoapods < 15.2
See facebook/react-native#42698
@karlhorky
Copy link

karlhorky commented Feb 17, 2024

Running pnpm expo prebuild --platform ios on GitHub Actions (runs-on: macos-12), we had to uninstall CocoaPods and install the fixed version 1.15.2 in a previous step:

      # 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 -v 1.15.0 --ignore-dependencies
          gem install cocoapods -v 1.15.2

      - name: Prepare files for xcodebuild command
        run: pnpm expo prebuild --platform ios

@cipolleschi
Copy link
Contributor

Closing the issue as Cocoapods 15.2 fixes it.

@cipolleschi cipolleschi unpinned this issue Feb 19, 2024
louischan-oursky added a commit to authgear/authgear-sdk-js that referenced this issue Feb 20, 2024
blakef added a commit to blakef/template that referenced this issue Feb 28, 2024
…702)

Summary:
Cocoapods 1.15 (facebook/react-native#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

## Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: facebook/react-native#42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd

Original: facebook/react-native@3869ae4
blakef added a commit to react-native-community/template that referenced this issue Feb 29, 2024
…702)

Summary:
Cocoapods 1.15 (facebook/react-native#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

## Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: facebook/react-native#42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd

Original-Commit: facebook/react-native@3869ae4
blakef added a commit to react-native-community/template that referenced this issue Feb 29, 2024
…702)

Summary:
Cocoapods 1.15 (facebook/react-native#42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

## Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: facebook/react-native#42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd

Original-Commit: facebook/react-native@3869ae4
@taylorkline
Copy link

@cipolleschi Would it make sense to revert or update #42702 | 3869ae4

blakef added a commit to blakef/react-native that referenced this issue Apr 18, 2024
Summary:
Previously we had to limit (facebook#42702) Cocoapods to avoid a broken version, this is no longer the case.

Changelog: [iOS][Changed] - Remove limit on Cocoapods to allow 1.15.2

Differential Revision: D56299927
blakef added a commit to blakef/react-native that referenced this issue Apr 18, 2024
Summary:

Previously we had to limit (facebook#42702) Cocoapods to avoid a broken version, this is no longer the case.

Changelog: [iOS][Changed] - Remove limit on Cocoapods to allow 1.15.2

Differential Revision: D56299927
@cipolleschi
Copy link
Contributor

@taylorkline no, I don't think it is worth.

The reason is the following:

  • if we remove the limitation, people can start using Cocoapods 1.15.0, 1.15.1 and 1.15.2, depending on what is installed on their system.
  • we know that 1.15.0 and 1.15.1 are broken.
  • by removing the limitation, we allow for users with those version installed to incur in problems (opening issues in React Native repo).
  • Cocoapods 1.15 does not add anything we need for React Native.
  • There is no way to express a range from 1.13 to 1.15.2, excluding some versions.

So, to avoid ruptures in anyone workflows, it is much safer to keep the limitation in place to avoid issues.

You can always customise your Gemfile to pin Cocoapods to 1.15.2, if that's what your team prefer! :D

@liamjones
Copy link
Contributor

@cipolleschi it doesn't affect your other points but re:

There is no way to express a range from 1.13 to 1.15.2, excluding some versions.

In the Gemfile? I think there is, I believe you can do the following:

gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'

@cipolleschi
Copy link
Contributor

@liamjones uh, interesting! #TIL

In that case, this is worth doing! cc. @blakef

facebook-github-bot pushed a commit that referenced this issue Jun 21, 2024
…5099)

Summary:
This PR uses a suggested solution from here: #42698 to allow users to use Cocoapods 1.15.2 which fixed issues regarding RN builds.

## Changelog:

[IOS] [FIXED] - Bump cocoapods version to 1.15.2 excluding 1.15.0, 1.15.1

Pull Request resolved: #45099

Test Plan: CI Green

Reviewed By: blakef

Differential Revision: D58863685

Pulled By: cipolleschi

fbshipit-source-id: 0128eb0cbf83e4a3d35addbae4c31e349775688c
ja1ns pushed a commit to WiseOwlTech/react-native-screens that referenced this issue Oct 9, 2024
…e-mansion#2032)

## Description

Because of the bug with Cocoapods, our CIs are failing on the cached
dependencies. This issue has been fixed in React Native 0.73.3 already,
but this version requires us to update Cocoapods version. This PR
updates our example projects to 0.73.4 version (which is the newest at
the moment) and updates the version of Cocoapods.
You can read more about the problem
[here](facebook/react-native#42698).

## Changes

- Updated examples that are matching 0.73 version to 0.73.4
- Updated Cocoapods version pattern in Gemfiles

## Checklist

- [x] Ensured that CI passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests