react-native-community / react-native-circleci-orb

A CircleCI Orb to Simplify Testing your React Native App
MIT License
176 stars 80 forks source link

Build failures related to cocoapods & activesupport (currently posted workarounds not fixing the rn/pod_install step) #179

Closed bhandanyan-nomad closed 11 months ago

bhandanyan-nomad commented 1 year ago

Orb version

7.1.1

What happened

iOS builds failing at pod install step with this error:

/Users/distiller/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

Related to these issues: https://github.com/facebook/react-native/issues/39832 https://github.com/CocoaPods/CocoaPods/issues/12081

The workarounds posted to those issues do not seem to work with the pod install on CI using this orb.

Full error:

/Users/distiller/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

  deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
                                                          ^^^^^^^^^^^
Did you mean?  deprecate_constant
        from /Users/distiller/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:8:in `<top (required)>'
        from <internal:/Users/distiller/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/Users/distiller/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /Users/distiller/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in `<top (required)>'
        from <internal:/Users/distiller/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/Users/distiller/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /Users/distiller/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/cocoapods-1.13.0/bin/pod:36:in `<top (required)>'
        from /Users/distiller/.rbenv/versions/3.1.4/bin/pod:25:in `load'
        from /Users/distiller/.rbenv/versions/3.1.4/bin/pod:25:in `<main>'

Exited with code exit status 1

I'm using this executor:

executor:
      name: rn/macos
      xcode_version: 15.0.0
      resource_class: macos.m1.medium.gen1
bhandanyan-nomad commented 1 year ago

Seems like a solution like this is needed due to how pods are installed https://github.com/CocoaPods/CocoaPods/issues/12081#issuecomment-1758379684

The manual uninstall & re-install seems to be working ok for me at the moment. Will leave the issue open for now in case there are other ideas or suggestions for how to fix builds with the orb. Thanks!