react-native
react-native copied to clipboard
CocoaPods 1.15.0 : `File exists @ syserr_fail2_in` Error - Workaround available
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
-
cd ios
-
bundle install
-
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
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
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'
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
amazing, thank you very much, downgrading to 1.14 solved my problem.
gem install cocoapods -v 1.14.3
Using @allynsweet solution, you can as another workaround, modify the Gemfile and set the CocoaPods version to 1.14
gem 'cocoapods', '1.14'
I had this issue and downgrading cocoapods did work for me too
Same. Downgrading to 1.14 worked for me as well.
Someone already opened an issue in the Cocoapods repo: https://github.com/CocoaPods/CocoaPods/issues/12226
The workaround, so far, is to downgrade to Cocoapods 1.14.
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.
Facing the same error after making the new react native project
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
...
@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.
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
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/
+1 Same issue here when using expo
@A320Peter @DutchPrince Please run pod --version
in the root of your project and ensure you are using 1.14.3
. If you are: cd ios
and run pod install
. This should work properly unless there's something else at play. Then cd ..
and run expo run:ios --no-install
, the --no-install
flag will skip the failing step you're reporting (Expo CLI docs for more info).
For any Expo users out here. Expo does not include a Gemfile
file on its default template and thus you don't need to change anything on your project. The only thing that you need to do for now is to downgrade the cocoapods version on your computer.
e.g.
gem install cocoapods -v 1.14.3
In case anybody else hit this problem and is relying on CI builds like we are (we use Bitrise), we were able to add the following script to our YML to move forward with the old version
- script@1:
title: Install proper Cocoapods Version
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -o pipefail
set -x
sudo gem uninstall cocoapods
gem install cocoapods -v 1.14.3
Had to do the uninstall first so that the only available version on the Bitrise run is the older Cocoapods version.
Thanks for your help @allynsweet! It does work now. The way I did it is the following on M2 macbook with Brew: brew unlink cocoapods
. Then I used the script you mentioned above to install the 1.14.3
:
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/1364b74ebeedb2eab300d62c99e12f2a6f344277/Formula/c/cocoapods.rb > cocoapods.rb
brew install cocoapods.rb
At this point it's still the 1.15
. I used brew uninstall cocoapods
to get rid of the current version and then brew link cocoapods
to link it to 1.14.3
which was installed previously.
I deleted the ios
and node_modules
folders. From the project directory I used npm install
and then npx expo run:ios --no-install
just to generate the ios
folder again. Then following your steps pod install
in the ios
folder, cd ..
and run the expo again with --no-install
flag.
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.
hi there! we do not ship a Gemfile in our template, so if you have added one to your project then you can modify the CocoaPods version in it to use 1.14.3. if you have installed CocoaPods directly via gem install
or brew
, uninstall it and reinstall 1.14.3 or whichever you were using most recently for your project.
I am also having this issue (using expo) AND downgrading to 1.14.x worked for me. Thanks for the report here!
Same issue on our side, fixed with gem install cocoapods -v 1.14.3
this issue is breaking xcode cloud builds. i am unable to specify to install specifically version 1.14. in ci_post_clone.sh
brew install [email protected] - does not work
any suggested workaround?
@levancho brew does not host older versions of cocoapods in their repository. For use in XCode Cloud, you need to download the old version directly in your script, then install it. Please see the answer above for the curl and brew commands (I tested it in XCode Cloud as well 👍)
I was 100% same with you(three pictures below are proof)
And now I solve like this way
cd ios
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.14.3
pod install
npm run ios
Our only problem was cocoapods 1.1.15. Just Downgrade it! I think many feel the same way like this. I hope this works for you🥹
this issue is breaking xcode cloud builds. i am unable to specify to install specifically version 1.14. in ci_post_clone.sh
brew install [email protected] - does not work
any suggested workaround?
I could make it work by updating our ci_postclone.sh
script with:
# !/bin/sh
# Install node 16
brew install node@16
brew unlink node
brew link node@16
node -v
npm install
# Install CocoaPods
cd /Volumes/workspace/repository/ios
bundle install
bundle exec pod install
# Go back to root
cd -
cd ios && bundle install && bundle exec pod install
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 ...
Same problem. I solved by writing bundle install on project root
for xcode cloud
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/1364b74ebeedb2eab300d62c99e12f2a6f344277/Formula/c/cocoapods.rb > cocoapods.rb brew install cocoapods.rb
solved the problem
In Gemfile
use gem 'cocoapods', '>= 1.13', '< 1.15'
Then bundle install
Then cd ios && pod install
Reference: https://react-native-community.github.io/upgrade-helper/?from=0.72.10&to=0.73.3