Xcode Cloud: pod install: Hermes install fails

Xcode Cloud build on Xcode 14.3.1 and MacOS Ventura 13.5.2 worked on 1/26/2024 and is failing this week (1/29/2024 ->) for multiple React Native apps.

This happens in branches that have not changed since the last successful build.

Local builds and 'pod install's continue to work.

Any help is appreciated.

ci_post_clone.sh

##################  Set Up Environment ##################################
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew install cocoapods
# have to add node yourself
brew install node@16
# link it to the path
brew link node@16

# local npm/jfrog auth method
...

# move to the project directory
cd ..
npm ci

# Install dependencies you manage with CocoaPods.
cd ios
pod install

Run ci_post_clone.sh script ... Installing boost (1.76.0)

Installing fmt (6.2.1)

Installing glog (0.3.5)

Installing hermes-engine (0.71.11)

[!] Error installing hermes-engine

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

Command

/usr/local/Cellar/cocoapods/1.15.0/libexec/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.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
    RubyGems : 3.5.4
        Host : macOS 13.5.2 (22G91)
       Xcode : 14.3.1 (14E300c)
         Git : git version 2.39.2 (Apple Git-143)
Ruby lib dir : /usr/local/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_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
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 'UI Kit App' do
  # Required by Expo modules
  use_expo_modules!
	  post_integrate do |installer|
	    begin
	      expo_patch_react_imports!(installer)
	    rescue => e
	      Pod::UI.warn e
	    end
	  end
    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.
      #:hermes_enabled => flags[:hermes_enabled],
      :hermes_enabled => true,
      :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}/.."
    )
    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

Error

Errno::EEXIST - File exists @ syserr_fail2_in - /Users/local/Library/Caches/CocoaPods/Pods/External/hermes-engine/fb17fa7201e9c4777a414e0d9d28892e-34c86/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2254:in `symlink'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2254:in `copy'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1048:in `block in copy_entry'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2385:in `wrap_traverse'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2388:in `block in wrap_traverse'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2387:in `each'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2387:in `wrap_traverse'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1045:in `copy_entry'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:990:in `block in cp_r'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2469:in `block in fu_each_src_dest'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2478:in `block in fu_each_src_dest0'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `each'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `fu_each_src_dest0'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2467:in `fu_each_src_dest'
/usr/local/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:989:in `cp_r'
/usr/local/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
...
/usr/local/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `load'
/usr/local/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `<main>'

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

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=File+exists+%40+syserr_fail2_in+-+%2FUsers%2Flocal%2FLibrary%2FCaches%2FCocoaPods%2FPods%2FExternal%2Fhermes-engine%2Ffb17fa7201e9c4777a414e0d9d28892e-34c86%2Fdestroot%2FLibrary%2FFrameworks%2Funiversal%2Fhermes.xcframework%2Fios-arm64_x86_64-maccatalyst%2Fhermes.framework%2FResources&type=Issues If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md Don't forget to anonymize any private data! Looking for related issues on cocoapods/cocoapods... Found no similar issues. To create a new issue, please visit: https://github.com/cocoapods/cocoapods/issues/new

We are having the same issue with React Native apps. Worked last week and failures started Monday with no changes

Sounds like this is an issue with CocoaPods 1.15.0. Fixed it by using Ruby to install version 1.14.3 of CocoaPods.

@PaulMTMN Do you find any solution ?

I solved this by installing cocoapods 1.14.3 via brew and adding these to path

  export PATH=/opt/homebrew/opt/ruby/bin:$PATH

  export PATH=`gem environment gemdir`/bin:$PATH

@PaulMTMN I was also able to resolve the issue by downgrading to 1.14.3.

Xcode Cloud: pod install: Hermes install fails
 
 
Q