EAS Build - iOS install pods error: undefined method `search' for "https://cdn.cocoapods.org/":String

After upgrading to the lastest SDK and eas-cli I now get this error inside the eas build pipeline “Install pods”. I’m really unfamiliar with iOS builds and therefore I would love to get assistance on this one.

Command

/usr/local/lib/ruby/gems/2.7.0/bin/pod install

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 1.11.3
        Ruby : ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]
    RubyGems : 3.2.22
        Host : macOS 12.6 (21G115)
       Xcode : 14.0 (14A309)
         Git : git version 2.37.0 (Apple Git-136)
Ruby lib dir : /usr/local/Cellar/ruby@2.7/2.7.5/lib
Repositories : cocoapods-cache - CDN - http://10.254.24.7:8081/repository/cocoapods-proxy/

Plugins

cocoapods-deintegrate  : 1.0.5
cocoapods-nexus-plugin : 0.0.9
cocoapods-plugins      : 1.0.0
cocoapods-search       : 1.0.1
cocoapods-trunk        : 1.6.0
cocoapods-try          : 1.2.0

Podfile

source 'https://cdn.cocoapods.org/'
        source 'https://github.com/SumSubstance/Specs.git'
        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 File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
platform :ios, podfile_properties['ios.deploymentTarget'] || '12.4'
install! 'cocoapods',
  :deterministic_uuids => false
target 'Fainin' do
  use_expo_modules!
# @generated begin react-native-maps - expo prebuild (DO NOT MODIFY) sync-e9cc66c360abe50bc66d89fffb3c55b034d7d369
  pod 'react-native-google-maps', path: File.dirname(`node --print "require.resolve('react-native-maps/package.json')"`)
# @generated end react-native-maps
  config = use_native_modules!
  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
  # Flags change depending on the env values.
  flags = get_default_flags()
  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Dir.pwd}/.."
  )
  # Uncomment to opt-in to using Flipper
  # Note that if you have use_frameworks! enabled, Flipper will not work
  #
  # if !ENV['CI']
  #   use_flipper!()
  # end
  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    # 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

NoMethodError - undefined method `search' for "https://cdn.cocoapods.org/":String
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:165:in `search_for'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by!'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:94:in `resolve'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/bin/pod:23:in `load'
/usr/local/lib/ruby/gems/2.7.0/bin/pod:23:in `<main>'

hi there! can you share a link to your build page?

This one: Build Details — 3c28ece9-a19a-410d-9f43-b62c197b6511 — Fainin — Expo ?

Hi, after some investigation it turned out that it was an issue on our end with our internal CocoaPods plugin. It should already be resolved on production. Let me know if you can build your project successfully now. Sorry for the inconvenience!

2 Likes

The next error appears now: Build Details — 82094e4a-6d5e-4c1a-890e-27ae8dacd3fa — Fainin — Expo

[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Error: Unknown error. See logs for more information.

Hey @kevfainin,

It seems like you are using expo-firebase-analytics in your project. To resolve it, you’ll have provide additional configuration using a config plugin. Please complete the information here: FirebaseAnalytics - Expo Documentation

Thank you for this hint. I came one step closer. But now there is another error - but I better make a new thread for this!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.