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

pod install fails on hermes engine #12261

Closed
sjohns21 opened this issue Feb 6, 2024 · 1 comment
Closed

pod install fails on hermes engine #12261

sjohns21 opened this issue Feb 6, 2024 · 1 comment

Comments

@sjohns21
Copy link

sjohns21 commented Feb 6, 2024

Command

/usr/local/Cellar/cocoapods/1.15.0/libexec/bin/pod install

Report

  • What did you do?
    pod install

  • What did you expect to happen?
    pods installed

  • What happened instead?
    throws

Stack

   CocoaPods : 1.15.0
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-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 : /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 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 'expoapp' 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/steve/Library/Caches/CocoaPods/Pods/External/hermes-engine/6ef44e4a609ea85b35328bf8b605bebb-b361c/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/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `each'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `block in copy_files'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in `lock'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in `copy_files'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in `block (2 levels) in uncached_pod'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `each'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `block in uncached_pod'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in `in_tmpdir'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in `download'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `each'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in `download_dependencies'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in `install!'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/bin/pod:55:in `<top (required)>'
/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>'
@paulb777
Copy link
Member

paulb777 commented Feb 6, 2024

Dupe of #12226

@paulb777 paulb777 closed this as completed Feb 6, 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

2 participants