You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proxying graphql calls (queries, mutations and subscriptions through websockets) from an Angular application using an Apollo client.
The Proxy was working well with an earlier version of node, but post upgrade to 16.15.1 (LTS), I get this error on starting ng serve:
✔ Compiled successfully.[HPM] Router new target: https://localhost:443/graphql -> "https://localhost:443/graphql"[HPM] GET /graphql/ -> https://localhost:443/graphql[HPM] Upgrading to WebSocket[HPM] Router new target: https://localhost:443/graphql -> "https://localhost:443/graphql"[HPM] GET /graphql/ -> https://localhost:443/graphql[HPM] Upgrading to WebSocket[HPM] Router new target: https://localhost:443/graphql -> "https://localhost:443/graphql"[HPM] GET /graphql/ -> https://localhost:443/graphql[HPM] Upgrading to WebSocket[HPM] Router new target: https://localhost:443/graphql -> "https://localhost:443/graphql"[HPM] GET /graphql/ -> https://localhost:443/graphql[HPM] Upgrading to WebSocketnode:events:505 throw er; // Unhandled 'error' event ^Error: write EPIPE at afterWriteDispatched (node:internal/stream_base_commons:160:15) at writeGeneric (node:internal/stream_base_commons:151:3) at Socket._writeGeneric (node:net:817:11) at Socket._write (node:net:829:8) at writeOrBuffer (node:internal/streams/writable:389:12) at _write (node:internal/streams/writable:330:10) at Socket.Writable.write (node:internal/streams/writable:334:10) at IncomingMessage.ondata (node:internal/streams/readable:754:22) at IncomingMessage.emit (node:events:527:28) at IncomingMessage.Readable.read (node:internal/streams/readable:527:10)Emitted 'error' event on Socket instance at: at Socket.onerror (node:internal/streams/readable:773:14) at Socket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -32, code: 'EPIPE', syscall: 'write'}
This happens as soon as I bring the application up in the browser. Looks like upgrading to Websocket is failing with this error.
Proxying to a Django server with Graphql support.
How often does it reproduce? Is there a required condition?
Everytime. If I set 'ws:false', the error does not happen
What is the expected behavior?
No EPIPE write error and node stays up and services the graphql calls by proxying them to the Django server.
What do you see instead?
EPIPE write error as shown in the output above.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Hi, @boomdizz. Could you help me understand how proxy.conf.js is used in your development server to achieve proxy? I don't know what development server you use. Seems some details is missing.
Since we are using Angular for the UI, we use ng in this manner:
ng serve --proxy-config proxy.conf.js --host 0.0.0.0
The proxy.conf.js file is the file I indicated in the initial bug filing.
So, when launched as a development server the UI makes graphql calls to the development server (node), which uses the proxy file to route the request/response back and forth with the Django backend.
Version
v16.15.1
Platform
Linux xxxxx-HP-EliteBook-840-G3 5.13.0-44-generic #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Running node as a development server with a proxy.conf.js file that looks like:
Proxying graphql calls (queries, mutations and subscriptions through websockets) from an Angular application using an Apollo client.
The Proxy was working well with an earlier version of node, but post upgrade to 16.15.1 (LTS), I get this error on starting ng serve:
This happens as soon as I bring the application up in the browser. Looks like upgrading to Websocket is failing with this error.
Proxying to a Django server with Graphql support.
How often does it reproduce? Is there a required condition?
Everytime. If I set 'ws:false', the error does not happen
What is the expected behavior?
No EPIPE write error and node stays up and services the graphql calls by proxying them to the Django server.
What do you see instead?
EPIPE write error as shown in the output above.
Additional information
No response
The text was updated successfully, but these errors were encountered: