Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoWeb crashes when trying to send parcel to client after WS connection is closed #463

Open
gnarea opened this issue Apr 5, 2021 · 3 comments
Labels
bug Something isn't working GSC Gateway Synchronisation Connection (e.g., PoWeb)

Comments

@gnarea
Copy link
Member

gnarea commented Apr 5, 2021

https://console.cloud.google.com/errors/CPyauKi4uIy8YQ?project=relaycorp-cloud-gateway

Unfortunately, the traceback is useless:

Error: WebSocket is not open: readyState 3 (CLOSED)
    at sendAfterClose (/opt/gw/node_modules/ws/lib/websocket.js:754:17)
    at WebSocket.send (/opt/gw/node_modules/ws/lib/websocket.js:345:7)
    at Duplex.duplex._write (/opt/gw/node_modules/ws/lib/stream.js:157:8)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)
    at Duplex.Writable.write (_stream_writable.js:318:11)
    at Object.sink (/opt/gw/node_modules/stream-to-it/sink.js:71:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

But the logs do show that a parcel was attempted to be sent 48ms after the connection was closed.

logs

@gnarea gnarea added bug Something isn't working GSC Gateway Synchronisation Connection (e.g., PoWeb) labels Apr 5, 2021
@gnarea
Copy link
Member Author

gnarea commented Jul 16, 2021

This could have the same root cause as relaycorp/awala-gateway-desktop#365

@gnarea
Copy link
Member Author

gnarea commented Jul 16, 2021

There are two bug fixes in this ws release that sound like they could address this issue: https://github.com/websockets/ws/releases/tag/7.5.3

@gnarea
Copy link
Member Author

gnarea commented Aug 11, 2021

ws v7.5.3 didn't fix this issue: It happened again with relaynet-internet-gateway v1.24.47, which had those fixes.


UPDATE: Actually, v1.24.47 didn't have the ws bug fixes. ws was upgraded in #589 but it didn't trigger a release by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GSC Gateway Synchronisation Connection (e.g., PoWeb)
Projects
None yet
Development

No branches or pull requests

1 participant