socketio / socketio/socket.io

There is a bug in socket.io-client version 4.8.1.

Open
#5,327 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs investigation unable to reproduce
Dominant language
TypeScript
Stars
63.2k
Forks
10.3k
Avg merge
11d 20h
Merged PRs (30d)
2

Description

When the connection between the client and server is established for the first time, everything works fine. However, as soon as the user goes offline and the socket.io-client attempts to reconnect between the client and server, there’s no issue up to this point. But the problem occurs when the user comes back online. In this case, an HTTP request is sent, but the middleware doesn’t execute, and the connection event is triggered directly. If there’s an authentication middleware, it won't be executed, causing the program to break. Both the server and client versions being used are 4.8.1. However, I didn’t encounter this issue with version 4.0.1, which I tested on the client side, and the program didn't break.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the offline/online reconnect sequence with socket.io-client and server version 4.8.1, focusing on the HTTP request and authentication middleware. Compare the behavior with client version 4.0.1 and verify that the middleware executes before the connection event after reconnection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, typescript
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.