Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Nov 14, 2025

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#178486

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.

Running flutter widget-preview start with Flutter web disabled will result in an error message stating that either Chrome couldn't be found or a StateError is thrown (for --web-server).

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/178486] When running flutter widget-preview start with Flutter Web disabled, an exception is thrown and the widget previewer fails to start.

Workaround:

Is there a workaround for this issue?

Run flutter config --enable-web, but there's currently no indication that this needs to be done.

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?

  1. Run flutter config --no-enable-web
  2. Run flutter widget-preview start in a Flutter project
  3. Verify an error message with instructions to enable Flutter web is output

…utter#178500)

If Flutter Web is not enabled, the widget previewer will crash when
trying to find a web device to launch with. This change explicitly
checks for this case and throws `ToolExit` with instructions to enable
Flutter Web if it's not enabled.

Fixes flutter#178486
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Nov 14, 2025
@flutteractionsbot
Copy link
Author

@bkonyi please fill out the PR description above, afterwards the release team will review this request.

@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 Nov 14, 2025
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 adds a check to ensure Flutter Web is enabled before running the widget preview command. If it's not enabled, it throws a ToolExit with a helpful message. A corresponding test is added to verify this behavior. The changes are correct and well-tested, but there is a minor issue in the new test case that needs to be addressed.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 17, 2025
@auto-submit auto-submit bot merged commit b8a7a92 into flutter:flutter-3.38-candidate.0 Nov 17, 2025
146 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 20, 2025
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.

3 participants