netty-socketio icon indicating copy to clipboard operation
netty-socketio copied to clipboard

1.7.20 version error

Open webinone opened this issue 2 years ago • 2 comments

I have been using netty-socketio since 2 years ago, and I am currently running version 1.7.19.

A new version #853 implementation group: 'com.corundumstudio.socketio', name: 'netty-socketio', version: '1.7.20'

However, at the same time as setting, clients cannot connect. The error contents are as follows.

com.corundumstudio.socketio.handler.AuthorizeHandler","message":"Unknown transport for request /socket.io/?EIO=3&token={token}&transport=websocket"}

Of course it works fine with 1.7.19 There seems to be a problem with the new version (1.7.20).

@mrniko

webinone avatar Jul 29 '22 06:07 webinone

There seems to be a problem with this pr. #808 If you want to do it that way, you need to make sure the transport is all uppercase.

ex) /socket.io/?EIO=3&token={token}&transport=websocket-> error /socket.io/?EIO=3&token={token}&transport=WEBSOCKET -> ok

I will fix it through a pull request.

webinone avatar Jul 31 '22 07:07 webinone

1.7.20 is a very broken release.

  1. https://github.com/mrniko/netty-socketio/blob/fe5368e9625edd4b1f5b0e1c61d75de4d3fdd9a3/src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java#L184 requires the transport name be upper case, WEBSOCKET or POLLING
  2. https://github.com/mrniko/netty-socketio/blob/fe5368e9625edd4b1f5b0e1c61d75de4d3fdd9a3/src/main/java/com/corundumstudio/socketio/transport/PollingTransport.java#L68 requires the transport name to be polling
  3. clients all send websocket or polling by default.

#1 and #2 mean the polling transport is completely broken. #3 means clients that worked fine with the previous patch release break with with this new patch release.

To make 1.7.20 work I have to add a pipeline handler before AUTHORIZE_HANDLER which upper cases the value of the transport query parameter, and another pipeline handler before XHR_POLLING_TRANSPORT which lower cases the value of transport.

hiredman avatar Aug 03 '22 16:08 hiredman

Fixed in https://github.com/mrniko/netty-socketio/commit/206f33006befaedfe47153a42ea2b4c7bfe301ee

mrniko avatar Sep 06 '22 04:09 mrniko