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

Cause: Error installing hermes-engine, Command pod install failed. #12240

Closed
vipul-azilen opened this issue Feb 1, 2024 · 2 comments
Closed

Comments

@vipul-azilen
Copy link

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.1.2 (23B92)
       Xcode : 15.0.1 (15A507)
         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

# Resolve react_native_pods.rb with node to allow for hoisting
def node_require(script)
  # Resolve script with node to allow for hoisting
  require Pod::Executable.execute_command('node', ['-p',
    "require.resolve(
      '#{script}',
      {paths: [process.argv[1]]},
    )", __dir__]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

setup_permissions([
  # 'AppTrackingTransparency',
  # 'Bluetooth',
  # 'Calendars',
  # 'CalendarsWriteOnly',
  'Camera',
  'Contacts',
  # 'FaceID',
  # 'LocationAccuracy',
  # 'LocationAlways',
  # 'LocationWhenInUse',
  # 'MediaLibrary',
  'Microphone',
  # 'Motion',
  # 'Notifications',
  'PhotoLibrary',
  # 'PhotoLibraryAddOnly',
  # 'Reminders',
  # 'Siri',
  # 'SpeechRecognition',
  # 'StoreKit',
])

# 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 'Telkom' 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}/.."
  )

  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseCoreExtension', :modular_headers => true
  pod 'FirebaseInstallations', :modular_headers => true
  pod 'GoogleDataTransport', :modular_headers => true
  pod 'nanopb', :modular_headers => true

  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/vipul.patel/Library/Caches/CocoaPods/Pods/External/hermes-engine/beb747db1871e8f1b05b698981c0581f-34304/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>'
@mustafa-boorenie
Copy link

Having the same issue! Anyone figured it out?

it works when using expo,
but when pre-building into react-native; there is an error installing cocoapods.

This is all using the template app, no code modifications at all.

@orta
Copy link
Member

orta commented Feb 1, 2024

Dupe of #12226

@orta orta closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants