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.

Unable to connect with `laravel-echo-server` with latest `socket.io-client`

See original GitHub issue

Describe the bug Whenever I try to connect with laravel-echo-server with the latest socket.io-client and laravel-echo, it does not connect to the laravel-echo-server, however If I downgrade socket.io-client version to 2.3.0, it works like charm.

I don’t know why it is failing

To Reproduce Steps to reproduce the behavior:

  1. Install laravel-echo and socket.io-client on fresh vue project.
  2. Add this code to src/main.js
window.io = require('socket.io-client');

window.Echo = new Echo({
    broadcaster: "socket.io",
    host: "http://localhost:6001",
    transports: ["websocket"]
});

window.Echo.channel('user-channel')
    .listen('UserEvent', e => {
        console.log(e);
        alert(e.name);
    });

window.Echo = Echo;
  1. But, If I downgrade to v2.3.0, then it works, same version as of socket.io in laravel-echo-server/package.json

Expected behavior It should connect to the laravel-echo-server but won’t connect

Additional context But, if the socket.io-client downgrade to v2.3.0 it works, not working with the latest version.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:9

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Laravel-echo-server and socket.io-client does't work on server
I use laravel echo server and socket.io-client and running at localhost is work at port 6001 and I config at server and use...
Read more >
Troubleshooting connection issues | Socket.IO
You are trying to reach a plain WebSocket server; The server is not reachable; The client is not compatible with the version of...
Read more >
Broadcasting with Laravel Echo, laravel-echo-server and ...
Broadcasting with Laravel Echo, laravel-echo-server and socket.io won't work · Laravel is running on port 8001 · Redis is running on 6379 ·...
Read more >
laravel-echo-server - npm
Laravel Echo Node JS Server for Socket.io. Latest version: 1.6.3, last published: a year ago. Start using laravel-echo-server in your ...
Read more >
socket.io+ laravel echo not working in production in ubuntu
I'm using socket.io and laravel echo server with Redis and also SSL ... allow UFW 6001 port. getting (failed)net::ERR_CONNECTION_TIMED_OUT error on console ...
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