socketio / socket.io

Realtime application framework (Node.JS server)
https://socket.io
MIT License
60.68k stars 10.09k forks source link

Latest uWs not working #5071

Open joacub opened 1 year ago

joacub commented 1 year ago

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

joacub commented 1 year ago

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 commented 1 year ago

some light on this:

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

joacub commented 1 year ago

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 commented 1 year ago

pull request:

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

darrachequesne commented 1 year ago

I'm looking into this.