Skip to content

Unable to restart webdev -- keep saying Connection refused #4296

@tomyeh

Description

@tomyeh

Sometimes when I restart DDC (by terminating it and running webdev serve web:9999 again), it fails with the following error:

WebSocketChannelException: SocketException: Connection refused (OS Error: Connection refused, errno = 61), address = localhost, port = 55107

Once this happens, I have to kill the dart:build_runer.dart process; otherwise, webdev serve is not able to start again. It looks like build_runner gets stuck in a loop of trying to start a process after the failure.

I haven’t found a reliable way to reproduce this, but it occurs occasionally (a couple of times per week) since build_runner 3.10.

One possible contributing factor is when the previous run ends in a bad state, for example:

Bad state: Sorted file IDs by package were already computed this build.

Image

This could be another issue, but easy to work around -- just touch a source file.

Metadata

Metadata

Assignees

Labels

type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions