Repository navigation
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolefound in release: 3.47Found to occur in 3.47Found to occur in 3.47platform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Summary
In Flutter 3.47.0 telemetry, an unhandled ProcessException when invoking xcodebuild emerged as a top crash signature.
When running flutter build macos on a machine where Xcode is not installed, incomplete (e.g. Command Line Tools only), or misconfigured, flutter_tools crashes with an unhandled ProcessException instead of providing a graceful ToolExit error message.
Telemetry Profile
- Release: Flutter 3.47.0 (Top 10 crasher)
- Signature:
ProcessException at RunResult.throwException at package:flutter_tools/src/base/process.dart-bd2448f2
Error Output
ProcessException: Process exited abnormally with exit code 72:
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH
Command: /usr/bin/arch -arm64e xcrun xcodebuild -clonedSourcePackagesDirPath ... -skipPackageUpdates -skipPackagePluginValidation -skipPackageSignatureValidation -list -project Runner.xcodeproj
Stack Trace
#0 RunResult.throwException (package:flutter_tools/src/base/process.dart:153:5)
#1 _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:379:19)
<asynchronous suspension>
#2 XcodeProjectInterpreter.getInfo (package:flutter_tools/src/ios/xcodeproj.dart:423:25)
<asynchronous suspension>
#3 buildMacOS (package:flutter_tools/src/macos/build_macos.dart:149:40)
<asynchronous suspension>
#4 BuildMacosCommand.runCommand (package:flutter_tools/src/commands/build_macos.dart:61:5)
Root Cause
buildMacOSinpackages/flutter_tools/lib/src/macos/build_macos.dartlacked pre-flight toolchain validation (globals.xcodeProjectInterpreter?.isInstalled != true) before querying Xcode project information.- In
XcodeProjectInterpreter.getInfo(packages/flutter_tools/lib/src/ios/xcodeproj.dart),xcodebuild -listis executed withthrowOnError: truewhile only allowing exit codes66and74. Whenxcrunreturns exit code72(unable to find utility "xcodebuild"),_processUtils.runthrows an uncaughtProcessException. buildMacOSimproperly used non-null assertions onprojectInfo!when resolving build schemes.
Proposed Fix
- Add pre-flight Xcode toolchain check in
buildMacOSto exit early withglobals.userMessages.xcodeMissing. - Wrap
XcodeProjectInterpreter.getInfoin atry ... on ProcessExceptionblock to convert unexpected process failures to user-friendlyToolExitmessages. - Add safe null checks on
projectInfoinbuildMacOS.
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolefound in release: 3.47Found to occur in 3.47Found to occur in 3.47platform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Activity
[flutter_tools] Handle missing Xcode gracefully in getInfo and buildM…
[stable] [flutter_tools] Handle missing Xcode gracefully in getInfo a…
github-actions commentedon Sep 7, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.