Description of the issue
Hello Bitrise Support Team,
I’m consistently encountering a build failure on my Flutter iOS project with a very specific error, and it appears to be a circular dependency related to darwin-podhelper.rb. This issue manifests even with a fresh app setup and default workflows.
My Goal: Build a standard Flutter iOS application for release (and eventually App Store submission). My app works perfectly on Android locally.
Environment Details:
Bitrise Stack: Xcode 16.0.x, M2 Pro Medium (or specific stack name if different)
Flutter Version: 3.32.0 (as installed by Bitrise's Flutter Install step, bundles Dart 3.8.0)
CocoaPods Version: 1.16.2 (as reported in logs)
Repository: https://github.com/PowerFinderGlobal/PowerFinderGlobal2.git (newly created, clean repo)
Build Type: iOS Release Build
Problem Description:
The build fails during the “Flutter Build” step when it implicitly runs pod install
(or a preceding pod install
step if explicitly added). The error consistently indicates that the Podfile
cannot load darwin-podhelper.rb
, because this file does not exist yet.
This creates a circular dependency: flutter build ios
(which is supposed to generate darwin-podhelper.rb
) fails because its internal pod install
attempts to process the Podfile
which require
s darwin-podhelper.rb
.
Steps to Reproduce (using a fresh setup):
- Create a new Flutter project locally (
flutter create my_app
). - Add a few common plugins (e.g.,
Maps_flutter
,geolocator
,sqflite
). - Commit all files, including the standard Flutter
ios/Podfile
, to a new, empty GitHub repository. - On Bitrise.io, “Add new app” and connect to this new repository.
- Allow Bitrise to auto-detect the Flutter project.
- Select Flutter as the project type.
- Choose Flutter Version
3.32.0
and Xcode Version16.0.x
. - Do NOT add any custom workflow scripts initially (use the default workflow).
- Upload iOS code signing assets (if applicable, though error occurs before signing).
- Trigger a new build.
Expected Behavior:
The build should complete successfully, with pod install
correctly integrating all Flutter plugins.
Actual Behavior / Error Log:
The build fails at the “Flutter Build” step (or an explicit “CocoaPods Install” step), with the following critical error from CocoaPods:
[!] Invalid
Podfile` file: cannot load such file – /Users/vagrant/git/ios/Flutter/ephemeral/.symlinks/flutter/darwin-podhelper.rb.
from /Users/vagrant/git/ios/Podfile:6
-------------------------------------------
#
Required to load Flutter helper methods like flutter_install_ios_plugin_pods
require File.expand_path(‘../Flutter/ephemeral/.symlinks/flutter/darwin-podhelper.rb’, FILE)
-------------------------------------------
Error running pod install
Run: failed to build iOS app: exit status 1`
Troubleshooting Attempted (Summarize briefly what you tried on Bitrise):
I have attempted various troubleshooting steps, including:
- Disabling the
Flutter Test
step. - Confirming
flutter clean
andflutter pub get
run successfully. - Explicitly setting Flutter version (
3.32.0
) and Xcode version (16.0.x
). - Trying a very complex custom workflow (similar to one used on Codemagic) that attempted to dynamically swap
Podfile
content (usingminimal_podfile_template.txt
andfull_podfile_template.txt
) to bypass this exact circular dependency. This also failed with the same core error. - Confirmed local Android builds work perfectly.
- Confirmed
pubspec.yaml
andios/Podfile
are standard Flutter-generated.
Request for Assistance:
This issue consistently appears across multiple fresh Bitrise app setups and even on another CI/CD platform (Codemagic), always pointing to this darwin-podhelper.rb
circular dependency. It seems to be a specific interaction of Flutter’s build tools with generic CI/CD environments.
Could you please investigate this issue with the specific Bitrise stack (Xcode 16.0.x, M2 Pro Medium)? Is there a recommended workaround, specific stack version, or an environment variable setting that can resolve this darwin-podhelper.rb
generation/loading conflict?
Thank you for your help!
Where did the issue happen?
If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)
Which build Step causes the issue and which version of the step?
E.g.: Git Clone v3.6.0
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) : NO
- Does a rebuild without caches help? (You can remove the
Cache:Pull
andCache:Push
steps temporarily to not to use the cache, or you can delete all the caches on theSettings
tab of the app. : NO - Does the issue happen sporadically, or every time? :Every time
- Does upgrading the build Step to the latest version help? : No
- When did the issue start? :When I first started
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.
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 ( Bitrise CLI )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: Running your build locally in Docker - Bitrise Docs .
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 - Contact us ), with a link to the related Discuss issue.