socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Latest uWs not working

Open joacub opened this issue 2 years ago • 5 comments

Error: Using uWS.HttpRequest / uWS.Http3Request past its request handler return is forbidden (it is stack allocated). at callback (/app/node_modules/.pnpm/[email protected]/node_modules/engine.io/build/userver.js:157:20)

joacub avatar May 22 '23 01:05 joacub

this is the issue,

transport = await this.handshake(
          req._query.transport,
          req,
          (errorCode, errorContext) =>
            this.abortRequest(res, errorCode, errorContext)
        );
        if (!transport) {
          return;
        }

you can not await and use httprequest after that

joacub avatar May 22 '23 01:05 joacub

some light on this:

https://github.com/uNetworking/uWebSockets.js/issues/907 https://github.com/kartikk221/hyper-express/issues/170

joacub avatar May 22 '23 16:05 joacub

we already have see what is the issue on this, the new alien mode is not allowing you to access the getHeader function, so you should cache them for later uses.

there is other issues in here about this mode.

joacub avatar May 22 '23 19:05 joacub

pull request:

https://github.com/socketio/engine.io/pull/681

joacub avatar May 22 '23 20:05 joacub

I'm looking into this.

darrachequesne avatar May 31 '23 13:05 darrachequesne

I think this can be closed now. Please reopen if needed.

darrachequesne avatar Oct 23 '24 08:10 darrachequesne