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

WebSocket sendMessage failed when adding a thing to a group #3102

Open
benfrancis opened this issue Aug 15, 2023 · 1 comment
Open

WebSocket sendMessage failed when adding a thing to a group #3102

benfrancis opened this issue Aug 15, 2023 · 1 comment
Labels
Milestone

Comments

@benfrancis
Copy link
Member

STR:

  1. Create a group
  2. Add a thing to a group

Expected:

  1. Thing is added to the group with no errors on the console

Actual:

  1. See an error on the console:

ERROR : WebSocket sendMessage failed: Error: WebSocket is not open: readyState 3 (CLOSED)

Similar bugs that may or may not be related:

@benfrancis benfrancis added the bug label Aug 15, 2023
@benfrancis benfrancis added this to the 1.2 milestone Aug 15, 2023
@benfrancis
Copy link
Member Author

It appears this error is only emitted when the server tries to send a message to a client which has not properly closed its WebSocket connection. Messages are successfully sent to open WebSockets.

The ReopeningWebSocket class on the client side appears to call WebSocket.close() on the beforeunload event, and groups_controller is meant to terminate WebSockets which haven't received a ping response in 30 seconds.

It's a bit tricky to test whether this is all working correctly, but if it is then I'm not sure there's much more we can do to prevent these errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant