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.

Socket.IO v3 refuses to reconnect after server fails and gets up again

See original GitHub issue
  • Echo Version: 1.10.0
  • Laravel Version: 8.x
  • PHP Version: 7.4
  • NPM Version: 6.14.6
  • Node Version: 14.5.0

Description:

Running on Socket.IO v3, if the server drops connection while the client still tries to reconnect, Echo does not reconnect to the previously connected channels.

I am aware there is PR https://github.com/laravel/echo/issues/290 that aims at Socket.IO v3, but I watched for v2 features that changed in v3 that this package uses, and found none: https://socket.io/docs/v3/migrating-from-2-x-to-3-0

Steps To Reproduce:

  1. Run a Socket.IO v3 server (i have a modified fork here: echo-server)
  2. You will see something like this, in the Requests tab under WS, on connect: conn1
  3. Close the server. The client will now try to reconnect at the given interval.
  4. Reopen the server, watch for the client to reconnect. Once it reconnects, it should look like this: conn2
  5. You can clearly see that it did not reconnect to the private-team.1 channel on reconnection.

The private channel code is:

window.Echo.private('team.1') // for example
    .listen('.alert.updated', e => {
        //
    });

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
driesvintscommented, Jan 11, 2021

Hmm, I’ll re-open this but will try to look into this when I have time for it. Appreciating any help however.

0reactions
driesvintscommented, Mar 30, 2021

We’ve decided we won’t be investing time anymore into Socket.io since we don’t maintain the laravel-echo-server package. Instead we recommend to use something like https://github.com/beyondcode/laravel-websockets. Sorry for this and thank you for understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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