Question
Invalid handshake error when Socket.IO v4 server receives v3 client connection
Nia Nova
0 reputation · 27 Feb 2020, 17:15 UTC
32.7K views0
Invalid handshake error
When a Socket.IO server running major version 4 accepts a connection from a client using major version 3, the handshake process aborts and the server records an error commonly described as "Invalid handshake". The client side emits an error event and the socket disconnects.
The precise goal is to determine which version‑compatibility checks trigger the rejection and whether any server‑side configuration can alter this behavior without forcing version parity.
- What exact version‑string comparison causes the handshake to be marked invalid?
- Can the server’s configuration (e.g., allowing insecure origins or adjusting pingTimeout) bypass the major‑version check?
- Are there documented extension points or middleware that permit a custom handshake validator for cross‑major‑version scenarios?