question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple connection occours while initializing in React Native

See original GitHub issue

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 `

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ved-numeroeinscommented, Nov 21, 2020

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.

1reaction
darrachequesnecommented, Jul 14, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data fetching with React Native - LogRocket Blog
In this article, you will learn how to fetch data from an API and display it to the user. We'll cover several approaches...
Read more >
Why redux multiple initializing - reactjs - Stack Overflow
Ok, i found the problem. Interesting with my wrong usage createStore function. I was calling in render()
Read more >
React.Component
Each component has several “lifecycle methods” that you can override to run code ... This method is called when a component is being...
Read more >
React State in Class and Function Components
In class components, there are two ways to initialize state — in a constructor function or as a Class property. Constructor functions, introduced...
Read more >
Performance Overview - React Native
Another example is responding to touches: if you are doing work across multiple frames on the JavaScript thread, you might notice a delay...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found