TRANSPORT_HANDSHAKE_ERROR
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 63.2k
- Forks
- 10.3k
- Avg merge
- 11d 20h
- Merged PRs (30d)
- 2
Description
Describe the bug
I am using socketio with eiows and fastify
We are running socketio on AWS EC2 instance behing loadbalancer.
Few of the users(Approx 1%) are not able to connect to socketio server and getting TRANSPORT_HANDSHAKE_ERROR.
I have printed the logs like below:
fastify.io.engine.on("connection_error", (err) => {
console.error("Socket connection error: code: " + err.code); // the error code, for example 1
console.error("Socket connection error: message: " + err.message); // the error message, for example "Session ID unknown"
console.error("Socket connection error: context: " + JSON.stringify(err.context)); // some additional error context
});
Below are the logs:
Socket connection error: code: 3
Socket connection error: message: Bad request
Socket connection error: context: {"name":"TRANSPORT_HANDSHAKE_ERROR"}
To Reproduce
I am not sure about the reproduction condition. It is happening for few users and we dont have the user details to connect to them,
Socket.IO server version: 4.8.1
Expected behavior
Socket connection should be success
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The named entry point is the Engine connection_error listener; begin by tracing the transport handshake path around that event and the AWS load-balancer setup. The report provides no reproduction steps, affected-user details, files, or tests, so first establish a reproducible case; done means identifying the failing handshake condition and verifying successful connections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, typescript
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 22/100