# Flutter : undefined method \`headers\_build\_phase' for #\<Xcodeproj::Project::Object::

**URL:** <https://discuss.bitrise.io/t/flutter-undefined-method-headers-build-phase-for-xcodeproj/16211>\
**Category:** Builds\
**Tags:** ios, flutter\
**Created:** [March 19, 2021, 10:04am UTC](https://discuss.bitrise.io/t/flutter-undefined-method-headers-build-phase-for-xcodeproj/16211 "2021-03-19T10:04:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yasheshc](https://avatars.discourse-cdn.com/v4/letter/y/ea666f/32.png) [@yasheshc](https://discuss.bitrise.io/u/yasheshc)\
**Post date:** [March 19, 2021, 10:04am UTC](https://discuss.bitrise.io/t/flutter-undefined-method-headers-build-phase-for-xcodeproj/16211/1 "2021-03-19T10:04:00Z")

</div>

# 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](http://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](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : 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](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? 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](http://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](https://www.bitrise.io/cli) )? If no, can it be reproduced with Docker (using the same docker images / environment we use on [bitrise.io](http://bitrise.io))? Related guide: [http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/](http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/) ._  
No reproducing locally

## Build log

_Please copy paste the build’s [bitrise.io](http://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](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:in`block (3 levels) in from\_ruby’  
/Users/vagrant/git/ios/Podfile:38:in `each' /Users/vagrant/git/ios/Podfile:38:in`block (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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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 `<main>' /Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:899:in`rescue 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: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: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: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: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: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: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: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: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: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: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: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: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: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: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’…

---

<div class="post-metadata">

**Author:** ![yasheshc](https://avatars.discourse-cdn.com/v4/letter/y/ea666f/32.png) [@yasheshc](https://discuss.bitrise.io/u/yasheshc)\
**Post date:** [March 22, 2021, 2:00pm UTC](https://discuss.bitrise.io/t/flutter-undefined-method-headers-build-phase-for-xcodeproj/16211/2 "2021-03-22T14:00:11Z")

</div>

Can anyone please look into this issue?

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [April 13, 2021, 2:08pm UTC](https://discuss.bitrise.io/t/flutter-undefined-method-headers-build-phase-for-xcodeproj/16211/3 "2021-04-13T14:08:58Z")

</div>

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/](https://app.bitrise.io/build/)) I’d be happy to take a closer look.

Matthew  
Senior Customer Engineer

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [May 13, 2021, 2:09pm UTC](https://discuss.bitrise.io/t/flutter-undefined-method-headers-build-phase-for-xcodeproj/16211/4 "2021-05-13T14:09:02Z")

</div>

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