zishang520/socket.io

Session ID unknown

zizhong opened this issue · 1 comments

Interesting issue found when integrating the library,

2023-05-25T09:00:05.708Z	DEBUG	HTTPS request received:	{"method": "", "RemoteURI": "/notifications/?transport=polling&EIO=3&t=1685005205.6987593", "ip": "", "status": 200}
2023-05-25T09:00:05.708Z	DEBUG	web/server.go:82	BodyDumpMiddleware: /notifications/ transport=polling&EIO=3&t=1685005205.6987593 GET 121:0{"maxPayload":100000,"pingInterval":25000,"pingTimeout":20000,"sid":"NGbaL9GzPY47nQAAAAAAAAAA","upgrades":["websocket"]}
2023-05-25T09:00:05.708Z	DEBUG	pubsub/pubsub.go:72	socketIO client NGbaL9GzPY47nQAAAAAAAAAA connected
2023-05-25T09:00:05.712Z	DEBUG	web/server.go:118	wrapBroadcastServerAndLogStatus: /notifications/ status 400
2023-05-25T09:00:05.712Z	DEBUG	HTTPS request received:	{"method": "", "RemoteURI": "/notifications/?transport=polling&EIO=3&sid=NGbaL9GzPY47nQAAAAAAAAAA", "ip": "", "status": 400}
2023-05-25T09:00:05.712Z	DEBUG	web/server.go:82	BodyDumpMiddleware: /notifications/ transport=polling&EIO=3&sid=NGbaL9GzPY47nQAAAAAAAAAA POST {"code":1,"message":"Session ID unknown"}
2023-05-25T09:00:05.723Z	DEBUG	web/server.go:118	wrapBroadcastServerAndLogStatus: /notifications/ status 400
2023-05-25T09:00:05.723Z	DEBUG	HTTPS request received:	{"method": "", "RemoteURI": "/notifications/?transport=polling&EIO=3&sid=NGbaL9GzPY47nQAAAAAAAAAA&t=1685005205.711163", "ip": "", "status": 400}
2023-05-25T09:00:05.723Z	DEBUG	web/server.go:82	BodyDumpMiddleware: /notifications/ transport=polling&EIO=3&sid=NGbaL9GzPY47nQAAAAAAAAAA&t=1685005205.711163 GET {"code":1,"message":"Session ID unknown"}

Seems like the first request and second request sent the same sid. The first request returned 200 but the second returned Session ID unknown".

Please feel free to let me know if you have any ideas! Thanks! @zishang520

Actually figured out the issue in the application code registering two different http handlers. Closing the issue.