Skip to content

[CP-beta][ Tool ] Handle DartDevelopmentServiceException when launching web applications#181162

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

[CP-beta][ Tool ] Handle DartDevelopmentServiceException when launching web applications#181162
auto-submit[bot] merged 1 commit into
flutter:flutter-3.41-candidate.0from
bkonyi:cp_3.41_1

Conversation

@bkonyi

@bkonyi bkonyi commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

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?

#178151

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

flutter run -d chrome can crash with a DartDevelopmentServiceException if the application shuts down during the startup sequence.

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 production app (the app crashes on launch)

Flaky crashes for users developing Flutter web applications. This is one of the top crashers for 3.38.

Workaround:

Is there a workaround for this issue?

N/A

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?

Difficult to validate manually as the failure is timing based. Tests have been added to simulate the crash scenario and verify the fix.

…applications (flutter#180905)

DWDS can throw `DartDvelopmentServiceException` if DDS fails to connect
to DWDS due to the target application shutting down immediately after
launch.

This change adds logic to catch this exception and exit gracefully.

Fixes flutter#178151

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@bkonyi bkonyi added the cp: review Cherry-picks in the review queue label Jan 19, 2026
@flutter-dashboard

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

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 handles a DartDevelopmentServiceException that can occur when launching web applications, preventing a crash. The change introduces a new catch block to gracefully handle this specific exception. The overall approach is sound and a regression test is included. I've suggested a minor improvement to add logging in the new exception handler for consistency with other handlers in the file, which will aid in debugging.

Comment thread packages/flutter_tools/lib/src/isolated/resident_web_runner.dart
@walley892 walley892 self-requested a review January 21, 2026 19:14
@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 57c022c 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