Skip to content

[ Tool ] Fix flutter run -d all crash#180845

Merged
auto-submit[bot] merged 1 commit intoflutter:masterfrom
bkonyi:issue-179857-multiple-device-crash
Jan 12, 2026
Merged

[ Tool ] Fix flutter run -d all crash#180845
auto-submit[bot] merged 1 commit intoflutter:masterfrom
bkonyi:issue-179857-multiple-device-crash

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Jan 12, 2026

661b8ed introduced changes related to build hooks that made assumptions about the value of the detected target platform, effectively restricting flutter run to targeting single devices.

This change fixes the regression which prevented developers from deploying their application to multiple devices with flutter run -d all.

Fixes #179857

661b8ed introduced changes related to
build hooks that made assumptions about the value of the detected target
platform, effectively restricting `flutter run` to targeting single devices.

This change fixes the regression which prevented developers from
deploying their application to multiple devices with `flutter run -d
all`.

Fixes flutter#179857
@bkonyi bkonyi requested review from jyameo and mosuem January 12, 2026 14:33
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 12, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a regression that caused flutter run -d all to crash. The fix correctly handles multiple target devices by changing the internal data structure from a single TargetPlatform to a Set<TargetPlatform>. The logic for building assets and running build hooks is updated to iterate over all detected target platforms, ensuring compatibility with multiple devices. A regression test has been added to verify the fix and prevent future regressions. The changes appear correct and well-tested.

Copy link
Contributor

@mosuem mosuem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 12, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Jan 12, 2026
Merged via the queue into flutter:master with commit 4e92c27 Jan 12, 2026
141 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 12, 2026
@bkonyi bkonyi added cp: beta cherry pick this pull request to beta release candidate branch cp: stable cherry pick this pull request to stable release candidate branch labels Jan 12, 2026
@flutteractionsbot
Copy link

Failed to create CP due to merge conflicts.
You will need to create the PR manually. See the cherrypick wiki for more info.

flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jan 12, 2026
661b8ed introduced changes related to
build hooks that made assumptions about the value of the detected target
platform, effectively restricting `flutter run` to targeting single
devices.

This change fixes the regression which prevented developers from
deploying their application to multiple devices with `flutter run -d
all`.

Fixes flutter#179857
bkonyi added a commit to bkonyi/flutter that referenced this pull request Jan 12, 2026
661b8ed introduced changes related to
build hooks that made assumptions about the value of the detected target
platform, effectively restricting `flutter run` to targeting single
devices.

This change fixes the regression which prevented developers from
deploying their application to multiple devices with `flutter run -d
all`.

Fixes flutter#179857
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 12, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 13, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 13, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 13, 2026
flutter/flutter@d81cd3e...793b0b8

2026-01-13 [email protected] Make sure that a FormField doesn't crash at 0x0 environment (flutter/flutter#180810)
2026-01-13 [email protected] Roll Fuchsia Linux SDK from VYeyMPe1lyCtlcl-V... to vTYb37OeUqZRxpiiP... (flutter/flutter#180880)
2026-01-13 [email protected] Make sure that a DisplayFeatureSubScreen doesn't crash in 0x0 environ… (flutter/flutter#180357)
2026-01-13 [email protected] Make sure that a DragTarget doesn't crash in 0x0 environment (flutter/flutter#180422)
2026-01-13 [email protected] Manually roll test dependencies (flutter/flutter#180886)
2026-01-12 [email protected] Roll Skia from f70bcbf1b090 to 714d0af2eda7 (2 revisions) (flutter/flutter#180866)
2026-01-12 [email protected] Roll libpng to version 1.6.53 (flutter/flutter#180712)
2026-01-12 [email protected] Turn on fragment shader equality test (flutter/flutter#180784)
2026-01-12 [email protected]  Update `PlatformPlugin` to not call `setStatusBarColor`, `setNavigationBarColor`, `setNavigationBarDividerColor` when disabled (flutter/flutter#180061)
2026-01-12 [email protected] Roll Skia from a650ce2b0d50 to f70bcbf1b090 (1 revision) (flutter/flutter#180860)
2026-01-12 [email protected] Fix RawAutocomplete unmounted crash during async optionsBuilder (flutter/flutter#180824)
2026-01-12 [email protected] Fix `documentation member not recognized` because of missing import in `FlutterEngine.java` (flutter/flutter#180731)
2026-01-12 [email protected] Roll Dart SDK from 42fd9ef68c1a to 34318de9874b (1 revision) (flutter/flutter#180854)
2026-01-12 [email protected] Add API sample and docs for Expansible widget (flutter/flutter#180273)
2026-01-12 [email protected] Roll Skia from 487a9943210b to a650ce2b0d50 (2 revisions) (flutter/flutter#180849)
2026-01-12 [email protected] Improve code quality in `BinaryMessenger.java` (flutter/flutter#180733)
2026-01-12 [email protected] Reland `Enabled some disabled impeller fragment shader dart tests` (flutter/flutter#180788)
2026-01-12 [email protected] [ Tool ] Fix `flutter run -d all` crash (flutter/flutter#180845)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@bkonyi bkonyi added cp: beta cherry pick this pull request to beta release candidate branch and removed cp: beta cherry pick this pull request to beta release candidate branch labels Jan 15, 2026
ikramhasan pushed a commit to ikramhasan/flutter that referenced this pull request Jan 15, 2026
661b8ed introduced changes related to
build hooks that made assumptions about the value of the detected target
platform, effectively restricting `flutter run` to targeting single
devices.

This change fixes the regression which prevented developers from
deploying their application to multiple devices with `flutter run -d
all`.

Fixes flutter#179857
bkonyi added a commit to bkonyi/flutter that referenced this pull request Jan 19, 2026
661b8ed introduced changes related to
build hooks that made assumptions about the value of the detected target
platform, effectively restricting `flutter run` to targeting single
devices.

This change fixes the regression which prevented developers from
deploying their application to multiple devices with `flutter run -d
all`.

Fixes flutter#179857
auto-submit bot pushed a commit that referenced this pull request Jan 21, 2026
### Issue Link:
What is the link to the issue this cherry-pick is addressing?

#179857

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

`flutter run -d all` causes the tool to crash if multiple devices are available.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

`flutter run -d all` causes the tool to crash if multiple devices are available.

### Workaround:
Is there a workaround for this issue?

No.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Run `flutter run -d all` with multiple non-web devices available and verify the application is deployed to all non-web devices.
ivan-vanyusho pushed a commit to ivan-vanyusho/packages that referenced this pull request Jan 26, 2026
flutter/flutter@d81cd3e...793b0b8

2026-01-13 [email protected] Make sure that a FormField doesn't crash at 0x0 environment (flutter/flutter#180810)
2026-01-13 [email protected] Roll Fuchsia Linux SDK from VYeyMPe1lyCtlcl-V... to vTYb37OeUqZRxpiiP... (flutter/flutter#180880)
2026-01-13 [email protected] Make sure that a DisplayFeatureSubScreen doesn't crash in 0x0 environ… (flutter/flutter#180357)
2026-01-13 [email protected] Make sure that a DragTarget doesn't crash in 0x0 environment (flutter/flutter#180422)
2026-01-13 [email protected] Manually roll test dependencies (flutter/flutter#180886)
2026-01-12 [email protected] Roll Skia from f70bcbf1b090 to 714d0af2eda7 (2 revisions) (flutter/flutter#180866)
2026-01-12 [email protected] Roll libpng to version 1.6.53 (flutter/flutter#180712)
2026-01-12 [email protected] Turn on fragment shader equality test (flutter/flutter#180784)
2026-01-12 [email protected]  Update `PlatformPlugin` to not call `setStatusBarColor`, `setNavigationBarColor`, `setNavigationBarDividerColor` when disabled (flutter/flutter#180061)
2026-01-12 [email protected] Roll Skia from a650ce2b0d50 to f70bcbf1b090 (1 revision) (flutter/flutter#180860)
2026-01-12 [email protected] Fix RawAutocomplete unmounted crash during async optionsBuilder (flutter/flutter#180824)
2026-01-12 [email protected] Fix `documentation member not recognized` because of missing import in `FlutterEngine.java` (flutter/flutter#180731)
2026-01-12 [email protected] Roll Dart SDK from 42fd9ef68c1a to 34318de9874b (1 revision) (flutter/flutter#180854)
2026-01-12 [email protected] Add API sample and docs for Expansible widget (flutter/flutter#180273)
2026-01-12 [email protected] Roll Skia from 487a9943210b to a650ce2b0d50 (2 revisions) (flutter/flutter#180849)
2026-01-12 [email protected] Improve code quality in `BinaryMessenger.java` (flutter/flutter#180733)
2026-01-12 [email protected] Reland `Enabled some disabled impeller fragment shader dart tests` (flutter/flutter#180788)
2026-01-12 [email protected] [ Tool ] Fix `flutter run -d all` crash (flutter/flutter#180845)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp: beta cherry pick this pull request to beta release candidate branch cp: stable cherry pick this pull request to stable release candidate branch tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tool_crash] Exception: Unsupported platform name "multiple"

3 participants