Skip to content

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Jan 13, 2026

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 #178151

…applications

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
@bkonyi bkonyi requested a review from jyameo January 13, 2026 16:24
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 13, 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 introduces handling for DartDevelopmentServiceException when launching web applications, preventing crashes when the application shuts down during DDS startup. This is achieved by adding a new catch block to gracefully exit. A regression test is included to verify this new behavior. Additionally, error logging for several other exception types has been refactored to use error.toString() for consistency and safety. My review includes a suggestion to refactor the new catch block to reduce code duplication.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Contributor

@jyameo jyameo left a comment

Choose a reason for hiding this comment

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

lgtm!

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Jan 13, 2026
Merged via the queue into flutter:master with commit d47b499 Jan 13, 2026
140 of 141 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 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 13, 2026
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jan 13, 2026
…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>
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jan 13, 2026
…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>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
@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
…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>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 15, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
tarrinneal pushed a commit to flutter/packages that referenced this pull request Jan 16, 2026
Manual roll requested by tarrinneal@google.com

flutter/flutter@b45a73b...5a2067b

2026-01-13 engine-flutter-autoroll@skia.org Roll Packages from
e57e7f4 to eb9e1dc (6 revisions) (flutter/flutter#180907)
2026-01-13 ahmedsameha1@gmail.com Make sure that a FocusScope doesn't
crash in 0x0 environment (flutter/flutter#180715)
2026-01-13 bkonyi@google.com [ Tool ] Handle
`DartDevelopmentServiceException` when launching web applications
(flutter/flutter#180905)
2026-01-13 116356835+AbdeMohlbi@users.noreply.github.com Removes
`RequiresApi 23` (flutter/flutter#180629)

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 stuartmorgan@google.com,tarrinneal@google.com 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 16, 2026
Manual roll requested by tarrinneal@google.com

flutter/flutter@b45a73b...48c2475

2026-01-13 ahmedsameha1@gmail.com Make sure that a FocusScope doesn't crash in 0x0 environment (flutter/flutter#180715)
2026-01-13 bkonyi@google.com [ Tool ] Handle `DartDevelopmentServiceException` when launching web applications (flutter/flutter#180905)
2026-01-13 116356835+AbdeMohlbi@users.noreply.github.com Removes `RequiresApi 23` (flutter/flutter#180629)

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 stuartmorgan@google.com,tarrinneal@google.com 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] DartDevelopmentServiceException

2 participants