Skip to content

flutter web app reporting websockectconnectionclosed #2753

@bsutton

Description

@bsutton

So the below error.

A couple of notes.

The app is doing continuous polling of the server to display log messages (the tool is a log observation front end).
The app allows you to 'tear off' a log window and open another browser window/tab tailing the selected log.

The error is only happening in the main app window (not the tear off).

I tried restarting the app and creating a new tear off - that wasn't enough to reproduce the problem and at the moment
I don't have an understanding of how to reproduce it.

I'm not seeing any errors in the chrome dev tools network window.
The errors are being reported in the dev tools console and also in the terminal cli that I launch the front end.

The front end still appears to be working without issue. The front end does 6 http request every couple of seconds the below error is output at about the same rate, but doesn't seem to correspond to a particular http request.

The code is currently in a private repo but I do intend to make it public if access to the code would be helpful.

[frontend] Unhandled error detected in the injected client.js script.

You can disable this script in webdev by passing --no-injected-client if it
is preventing your app from loading, but note that this will also prevent
all debugging and hot reload/restart functionality from working.

The original error is below, please file an issue at
https://github.com/dart-lang/webdev/issues/new and attach this output:

WebSocketConnectionClosed: Connection Closed

    at Object.throwExpression (http://localhost:8788/dwds/src/injected/client.js:1312:64)
    at PersistentWebSocket._writeToWebSocket$1 (http://localhost:8788/dwds/src/injected/client.js:24827:13)
    at tear_off.<anonymous> (http://localhost:8788/dwds/src/injected/client.js:1637:45)
    at StaticClosure._rootRunUnary (http://localhost:8788/dwds/src/injected/client.js:4317:18)
    at _CustomZone.runUnary$2$2 (http://localhost:8788/dwds/src/injected/client.js:15140:39)
    at _CustomZone.runUnaryGuarded$1$2 (http://localhost:8788/dwds/src/injected/client.js:15087:14)
    at _ControllerSubscription._sendData$1 (http://localhost:8788/dwds/src/injected/client.js:14587:19)
    at _DelayedData.perform$1 (http://localhost:8788/dwds/src/injected/client.js:14762:59)
    at _PendingEvents_schedule_closure.call$0 (http://localhost:8788/dwds/src/injected/client.js:14821:14)
    at StaticClosure._rootRun (http://localhost:8788/dwds/src/injected/client.js:4298:18)
    at _CustomZone.run$1$1 (http://localhost:8788/dwds/src/injected/client.js:15132:39)
    at _CustomZone.runGuarded$1 (http://localhost:8788/dwds/src/injected/client.js:15075:14)
    at _CustomZone_bindCallbackGuarded_closure.call$0 (http://localhost:8788/dwds/src/injected/client.js:15264:25)
    at StaticClosure._rootRun (http://localhost:8788/dwds/src/injected/client.js:4302:16)
    at _CustomZone.run$1$1 (http://localhost:8788/dwds/src/injected/client.js:15132:39)
    at _CustomZone.runGuarded$1 (http://localhost:8788/dwds/src/injected/client.js:15075:14)
    at _CustomZone_bindCallbackGuarded_closure.call$0 (http://localhost:8788/dwds/src/injected/client.js:15264:25)
    at Object._microtaskLoop (http://localhost:8788/dwds/src/injected/client.js:4148:24)
    at StaticClosure._startMicrotaskLoop (http://localhost:8788/dwds/src/injected/client.js:4154:11)
    at _AsyncRun__initializeScheduleImmediate_internalCallback.call$1 (http://localhost:8788/dwds/src/injected/client.js:13521:9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onpackage:dwdstriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions