-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Invalid access of closed uWS.WebSocket/SSLWebSocket. #169
Comments
This can happen if the server gets closed and somehow, a nasty message wants to be sent by your user in the server. I think this is a real bug after i checked the code again. I'm working on a fix. 🔧 |
Great, so would the bug stop messages being sent to users? |
I assume your server hanged closing and that's why your users could access other channels but not their current ones. I need more info to help you.
|
Thanks Joe |
The issue is that for some reason, environmentally-based, your server hanged closing. What I'd recommend here, and I'll update docs regarding this thing, you should have a retry policy for sending messages. I'll have a soft check in the app fixing message sending and communication for pending closing servers so that once the server receives any You don't need Redis if you have only one instance running at any time. That's because Redis is used for inter-node comms. |
We have had some issues with the server throwing these exceptions in the CLI from the server it is running from, while these errors were being thrown we had issues with clients not receiving messages.
The client could subscribe to the channel however would not receive any messages while other clients on the same channel would. If the same client joined another channel they would be getting messages. This was completely random on what clients would receive which messages, we have since restarted the pws-server and now cannot replicate the errors again.
Any help would be much appreciated.
(node:3267) UnhandledPromiseRejectionWarning: Error: Invalid access of closed uWS.WebSocket/SSLWebSocket.
at uWS.WebSocket.ws.sendJson (/usr/lib/node_modules/@soketi/pws/dist/ws-handler.js:22:20)
at /usr/lib/node_modules/@soketi/pws/dist/ws-handler.js:44:20
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use
node --trace-warnings ...
to show where the warning was created)(node:3267) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)(node:3267) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered: