Flutter : undefined method `headers_build_phase' for #<Xcodeproj::Project::Object::

Bitrise Build Issue Report template

Flutter : undefined method `headers_build_phase’ for #<Xcodeproj::Project::Object::

While generating flutter build for iOS getting this error

Environment:

Where did the issue happen?

If on Bitrise.io: which stack? Flutter build

Which build Step causes the issue and which version of the step?

id: flutter-build |
| version: 0.13.2

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : YES
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Everytime
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Starting from setting up new project

Local reproduction

_Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried. I tried it locally and it’s works.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .
No reproducing locally

Build log

Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - https://www.bitrise.io/contact ), with a link to the related Discuss issue.

  • Installing Aggregate Targets
    - Installing target Pods-Runner iOS 10.0
    - Generating Info.plist file at Pods/Target Support Files/Pods-Runner/Pods-Runner-Info.plist
    - Generating module map file at Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap
    - Generating umbrella header at Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h
    - Generating dummy source at Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m
    • Generating deterministic UUIDs
    • Stabilizing target UUIDs
    • Running post install hooks
      [!] An error occurred while processing the post-install hook of the Podfile.
      undefined method headers_build_phase' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x00007fb004f77540> /Users/vagrant/git/ios/Podfile:43:inblock (3 levels) in from_ruby’
      /Users/vagrant/git/ios/Podfile:38:in each' /Users/vagrant/git/ios/Podfile:38:inblock (2 levels) in from_ruby’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/podfile.rb:179:in post_install!' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:897:inrun_podfile_post_install_hook’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:885:in block in run_podfile_post_install_hooks' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:145:inmessage’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:884:in run_podfile_post_install_hooks' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:329:inblock (2 levels) in create_and_save_projects’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in write!' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:328:inblock in create_and_save_projects’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in section' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:307:increate_and_save_projects’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:299:in generate_pods_project' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:178:inintegrate’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:166:in install!' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command/install.rb:52:inrun’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:inrun’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/bin/pod:55:in <top (required)>' /Users/vagrant/.rbenv/versions/2.6.5/bin/pod:23:inload’
      /Users/vagrant/.rbenv/versions/2.6.5/bin/pod:23:in <main>' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:899:inrescue in run_podfile_post_install_hook’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:896:in run_podfile_post_install_hook' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:885:inblock in run_podfile_post_install_hooks’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:145:in message' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:884:inrun_podfile_post_install_hooks’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:329:in block (2 levels) in create_and_save_projects' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:inwrite!’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:328:in block in create_and_save_projects' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:insection’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:307:in create_and_save_projects' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:299:ingenerate_pods_project’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:178:in integrate' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:166:ininstall!’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command/install.rb:52:in run' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:inrun’
      /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:in run' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/bin/pod:55:in<top (required)>’
      /Users/vagrant/.rbenv/versions/2.6.5/bin/pod:23:in load' /Users/vagrant/.rbenv/versions/2.6.5/bin/pod:23:in
      Error output from CocoaPods:

      Cloning into ‘/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/d20210319-3017-1x7csy6’…
      Cloning into ‘/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/d20210319-3017-144i1je’…

Can anyone please look into this issue?

It looks like one of your plugins is using a problematic dependency. It looks like CocaPods isn’t able to build whatever it is you’re pulling in. Without seeing the full log it’s difficult to know for sure.

If you want to enable support access and provide a build slug (the part of your build URL after https://app.bitrise.io/build/) I’d be happy to take a closer look.

Matthew
Senior Customer Engineer

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