Skip to content

[CP-beta][ Tool ] Fix flutter run -d all crash (#180845)#181163

Merged
auto-submit[bot] merged 1 commit intoflutter:flutter-3.41-candidate.0from
bkonyi:cp_3.41_2
Jan 21, 2026
Merged

[CP-beta][ Tool ] Fix flutter run -d all crash (#180845)#181163
auto-submit[bot] merged 1 commit intoflutter:flutter-3.41-candidate.0from
bkonyi:cp_3.41_2

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Jan 19, 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 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?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

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.

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 added the cp: review Cherry-picks in the review queue label Jan 19, 2026
@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 19, 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 crash that occurs when using flutter run -d all with multiple devices. The core of the change is in HotRunner, which now correctly handles multiple target platforms by using a Set<TargetPlatform> to store all device platforms, rather than a single _targetPlatform. The _updateDevFS method has been updated to iterate over this set, ensuring assets are built for each distinct platform. A regression test has also been added to verify the fix for scenarios involving multiple devices.

@walley892 walley892 self-requested a review January 21, 2026 19:13
Copy link
Contributor

@walley892 walley892 left a comment

Choose a reason for hiding this comment

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

LGTM

@walley892 walley892 added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 21, 2026
@auto-submit auto-submit bot merged commit e4f9901 into flutter:flutter-3.41-candidate.0 Jan 21, 2026
141 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants