Skip to content
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

Multiple connection occours while initializing in React Native #1402

Closed
ledmago opened this issue Nov 13, 2020 · 5 comments
Closed

Multiple connection occours while initializing in React Native #1402

ledmago opened this issue Nov 13, 2020 · 5 comments

Comments

@ledmago
Copy link

ledmago commented Nov 13, 2020

I am currently developing a project in React Native. In the version of 3.0.1 socket.io-client, I am trying to connect to a server, it connects multiple times maybe 5 times when the app is opening. I fixed this issue by downgrading the version to 2.1.1.

`Client connected -> ASkjAS35USD
Client connected -> WEIAUHB98
Client connected -> KALSKF876
Client connected -> LKKJHJSDNB90

Client disconnected (time out)-> ASkjAS35USD
Client disconnected (time out) -> WEIAUHB98
Client disconnected (time out) -> KALSKF876
`

@ved-numeroeins
Copy link

I am facing the same issue with an angular project. I am using version v3.0.3 of socket.io-client. It connects around 7 times and then starts disconnecting them automatically.

@guiseek
Copy link

guiseek commented Jan 10, 2021

it's also happening to me in version 3, i'm looking forward to using it due to the new features, but i had to limit myself to 2. because the problem doesn't happen

Angular Project also, like the @ved-numeroeins project

@darrachequesne
Copy link
Member

Hi! I'm not able to reproduce:

Which version of Socket.IO server are you using? (because you cannot reach a v2 server with a v3 client, and vice-versa).

@Hatko
Copy link

Hatko commented Feb 15, 2021

@darrachequesne was my issue - NestJS uses v2

darrachequesne added a commit to socketio/socket.io-website that referenced this issue Jul 14, 2021
darrachequesne added a commit to socketio/socket.io-website that referenced this issue Jul 14, 2021
@darrachequesne
Copy link
Member

For future readers, I suspect this is due to a version incompatibility. I added a note here: https://socket.io/docs/v4/troubleshooting-connection-issues/#The-client-is-not-compatible-with-the-version-of-the-server-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants