I'm currently seeing this error from flutter run when running on my MacBook and targeting an iOS simulator:
Uncategorized (Xcode): Exited with status code 255
Could not build the application for the simulator.
Error launching application on iPhone 16e.
flutter run -v verbose logs include these errors:
fatal: multi-pack-index version 2 not recognized
...
Failed to download https://storage.googleapis.com/flutter_infra_release/flutter/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391/engine_stamp.json. Ensure you have network connectivity and then try again.
I recently upgraded to macOS 26.4 - this may be related to that.
Investigated this and found that:
- This happens because the
bin/cache/engine.stamp file is overwritten during the execution of flutter run
- During
flutter run the bin/internal/update_engine_version.sh script is run with a modified PATH that is presumably set by Xcode
- That path places
/Applications/Xcode.app/Contents/Developer/usr/bin at the start of PATH
- That directory contains a version of
git that identifies itself as git version 2.50.1 (Apple Git-155)
- Running that version of
git on my checkout of Flutter produces the fatal: multi-pack-index version 2 not recognized error. My setup usually has Git 2.53 at the head of its PATH, and Git 2.50.1 is not compatible with the repository created by 2.53.
- The
bin/internal/content_aware_hash.sh script does not catch the error, computes the wrong hash, and writes that to bin/cache/engine.stamp
- The
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 hash seen in the bad URL comes from git hash-object --stdin computing a hash for the empty output of the failing git ls-tree command in content_aware_hash.sh
Issues:
content_aware_hash.sh should produce an error if this occurs
flutter run for Apple platforms needs a way to work around Xcode's manipulation of the PATH to prefer Apple's version of Git
@jtmcdole @jmagman
I'm currently seeing this error from
flutter runwhen running on my MacBook and targeting an iOS simulator:flutter run -vverbose logs include these errors:I recently upgraded to macOS 26.4 - this may be related to that.
Investigated this and found that:
bin/cache/engine.stampfile is overwritten during the execution offlutter runflutter runthebin/internal/update_engine_version.shscript is run with a modifiedPATHthat is presumably set by Xcode/Applications/Xcode.app/Contents/Developer/usr/binat the start of PATHgitthat identifies itself asgit version 2.50.1 (Apple Git-155)giton my checkout of Flutter produces thefatal: multi-pack-index version 2 not recognizederror. My setup usually has Git 2.53 at the head of itsPATH, and Git 2.50.1 is not compatible with the repository created by 2.53.bin/internal/content_aware_hash.shscript does not catch the error, computes the wrong hash, and writes that tobin/cache/engine.stampe69de29bb2d1d6434b8b29ae775ad8c2e48c5391hash seen in the bad URL comes fromgit hash-object --stdincomputing a hash for the empty output of the failinggit ls-treecommand incontent_aware_hash.shIssues:
content_aware_hash.shshould produce an error if this occursflutter runfor Apple platforms needs a way to work around Xcode's manipulation of thePATHto prefer Apple's version of Git@jtmcdole @jmagman
As a workaround, you can try setting
GIT_CONFIG_PARAMETERS="'core.multiPackIndex=false'"before your flutter command. Example:I also wrote a skill you can use for your agents: go/flutter-ios-ai-prompts-draft