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
Describe the bug
When running socket.io and uNetworking/uWebSockets.js, we sometimes get this error:
Error: uWS.HttpResponse must not be accessed after uWS.HttpResponse.onAborted callback, or after a successful response. See documentation for uWS.HttpResponse and consult the user manual.
It happens rarely (~10 times in last 30 days). We've recently come up with a way to replicate it locally, although I'm not sure if it's the same cause as on production.
To Reproduce
Engine.IO server version: 6.6.0
Engine.IO client version: 6.5.4
import{Server}from'socket.io';import{connect}from'socket.io-client';import{AppascreateApp}from'uWebSockets.js';constPORT=3000;constSERVER_URL=`http://localhost:${PORT}`;// Initialize socket.io server with uWebSockets appconstserver=newServer({serveClient: false});constapp=createApp();server.attachApp(app);// Listen and wait for it to be readyawaitnewPromise((r)=>app.listen(PORT,r));// Create a new socket.io client and wait for it to connectconstsocket=connect(SERVER_URL);awaitnewPromise((r)=>socket.once('connect',r));// Mimic a new socket.io client connection with an already connected session ID// Engine.io will close the connection, but will incorrectly attempt to upgrade it afterwards// See https://github.com/socketio/engine.io/blob/6.6.0/lib/userver.ts#L213try{newWebSocket(`ws://localhost:3000/socket.io/?EIO=4&transport=websocket&sid=${socket.io.engine.id}`,);}catch{}// Exit when there is no errorsetTimeout(()=>process.exit(0),2_000);
Note: The above snippet will require Node 22 to run.
Expected behavior
I expect it to exit normally after the 2s timeout.
Actual behavior
It crashes with the error message mentioned above.
Describe the bug
When running
socket.io
anduNetworking/uWebSockets.js
, we sometimes get this error:It happens rarely (~10 times in last 30 days). We've recently come up with a way to replicate it locally, although I'm not sure if it's the same cause as on production.
To Reproduce
Engine.IO server version:
6.6.0
Engine.IO client version:
6.5.4
Note: The above snippet will require Node 22 to run.
Expected behavior
I expect it to exit normally after the 2s timeout.
Actual behavior
It crashes with the error message mentioned above.
Platform:
Additional context
The text was updated successfully, but these errors were encountered: