-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Milestone
Description
🐞 Bug report
Command
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
yes, this worked before upgrading from 12.1.1
Description
For a couple years at work, we have used /ws/ as the root path for websocket connections. After upgrading to angular 13 this is no longer compatible with the live re-loader because its url has been changed from /socket-nodejs/xxx/xxx/websocket to /ws/ which conflicts with the http proxy in my case.
This results in the client continuously attempting to establish a connection with ERR_STREAM_WRITE_AFTER_END displayed in the dev server console.
I followed the upgrade guide for a complex app, but didn't see anything relevant to this change: https://update.angular.io/?l=3&v=12.0-13.0
🔬 Minimal Reproduction
- Start a server on
localhost:8000that establishes a websocket connections on/ws/(the actual establishment might not be a necessary step) - Route all
/ws/requests to that server in yourproxy.config.json:
{
"/ws": {
"target": "http://localhost:8000",
"secure": false,
"ws": true
}
}
- run
ng serve - Check either the dev server console to see the exception above, or watch the network tab in the browser to see the attempts to establish a connection over and over
🔥 Exception or Error
[webpack-dev-server] [HPM] WebSocket error: Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at new NodeError (node:internal/errors:371:5)
at _write (node:internal/streams/writable:319:11)
at Socket.Writable.write (node:internal/streams/writable:334:10)
at Sender.sendFrame (/home/brian/dev/preondock/node_modules/webpack-dev-server/node_modules/ws/lib/sender.js:469:20)
at Sender.close (/home/brian/dev/preondock/node_modules/webpack-dev-server/node_modules/ws/lib/sender.js:197:12)
at WebSocket.close (/home/brian/dev/preondock/node_modules/webpack-dev-server/node_modules/ws/lib/websocket.js:300:18)
at Receiver.receiverOnConclude (/home/brian/dev/preondock/node_modules/webpack-dev-server/node_modules/ws/lib/websocket.js:1114:18)
at Receiver.emit (node:events:526:28)
at Receiver.controlMessage (/home/brian/dev/preondock/node_modules/webpack-dev-server/node_modules/ws/lib/receiver.js:582:14)
at Receiver.getData (/home/brian/dev/preondock/node_modules/webpack-dev-server/node_modules/ws/lib/receiver.js:429:42) {
code: 'ERR_STREAM_WRITE_AFTER_END'
}
🌍 Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 13.3.7
Node: 16.14.2
Package Manager: yarn 1.22.5
OS: linux x64
Angular: 13.3.11
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.7
@angular-devkit/build-angular 13.3.7
@angular-devkit/core 13.3.7
@angular-devkit/schematics 13.3.7
@angular/cdk 13.3.8
@angular/cli 13.3.7
@schematics/angular 13.3.7
rxjs 6.6.7
typescript 4.6.4
Anything else relevant?
It would be nice if the live reload path was made configurable
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix