-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 Forbidden on POST with Bad handshake method #1390
Comments
Check client and server versions are the same, connecting to v3.0.0 server with a v2.x.x client won't work, with this exact error. Its due to the |
@lcherone I don't think that's related to the v3 release, as it was not actually released when the issue was created 5 days ago. Or did that happen with a release candidate version? @zhangzheng7856 could you please give additional details? Are you using the JS server/client? Which version? The error is thrown here: https:/socketio/engine.io/blob/4.0.1/lib/server.js#L137 Which means the server receives an HTTP request that is not a GET, but without a sid, which is invalid. Possibly related: socketio/engine.io-client#636 |
@lcherone You are correct. I have the same issue because the client-side using version 3.0.0 that release 2 days ago while the server-side uses laravel-echo-server that using 2.x.x version. |
@travisnguyen20 It happened to me too, had old project which used 2.3.0 which just copied, then when coding the server part I did Is all todo with the recent Edit, here's an example of it not working: https://glitch.com/edit/#!/socket-io-sid?path=views%2Findex.html%3A13%3A22 |
Okay... 3 hours facing this problem xd. My head is literally exploded right now! So it seems I'm not the only one with this problem right? |
@dalexhd I'm not sure I understand. Do you have the same version of Socket.IO on both sides? |
Yes the same versión of socket.io client. |
Before this fix, the client could mark the polling transport as open even though the handshake packet was not received properly (for example, after a parsing error). This could lead to writes (POST requests) without "sid" query param, which failed with: ``` {"code":2,"message":"Bad handshake method"} ``` Related: - #636 - socketio/socket.io-client#1390
@darrachequesne I'm hijacking this thread for a similar issue, mentioned here #1140 (comment). Could you clarify if this is a bug or a breaking change between v2.3 and v3.0? |
This is indeed a bug. It should be fixed by socketio/engine.io-client@1c8cba8, included in Can anyone confirm? |
I installed version 3.0.3 on client and server, and this issue still persists. |
I'm closing this, as I think the issue is now fixed. @mcarnoky001 could you please open an issue with a reproducing test case? Thanks! |
Before this fix, the client could mark the polling transport as open even though the handshake packet was not received properly (for example, after a parsing error). This could lead to writes (POST requests) without "sid" query param, which failed with: ``` {"code":2,"message":"Bad handshake method"} ``` Related: - #636 - socketio/socket.io-client#1390 Cherry-picked from master: 1c8cba8
return {"code":2,"message":"Bad handshake method"}
what it mean?
and how can i resolve it?
The text was updated successfully, but these errors were encountered: