laravel-echo-server icon indicating copy to clipboard operation
laravel-echo-server copied to clipboard

Not receiving websocket's message in frontend by the listener

Open devsafarian opened this issue 4 years ago • 23 comments

I have already asked here: https://stackoverflow.com/questions/65026362/laravel-echo-listener-not-working-on-frontend Please take a look.

devsafarian avatar Nov 26 '20 17:11 devsafarian

I had the same issue, workaround downgrade "socket.io-client": "2.3.0" in your package.json works fine. Would appreciate a solution with latest 3.x version of socket.io-client.

lc3t35 avatar Dec 03 '20 11:12 lc3t35

Thank you lc3t35. Had the exact same issue, had me looking up and down for a week long. Downgrading indeed fixed it!

Murdock09 avatar Dec 17 '20 18:12 Murdock09

I had the same issue, workaround downgrade "socket.io-client": "2.3.0" in your package.json works fine. Would appreciate a solution with latest 3.x version of socket.io-client.

After 3 days of debugging... THIS WORKED! Thank you for posting your solution!

sergiuwd avatar Jan 05 '21 20:01 sergiuwd

Same here downgrading fixed the issue :). I'm using laravel-echo-server and redis as my queue driver

melvin78 avatar Jan 16 '21 16:01 melvin78

I had the same issue, workaround downgrade "socket.io-client": "2.3.0" in your package.json works fine. Would appreciate a solution with latest 3.x version of socket.io-client.

After 3 days of debugging... THIS WORKED! Thank you for posting your solution!

Welcome in my club dude! Also 3 wasted days for me ;( Never thought about the socket.io-client downgrade as a solution. Finally private channels work <3

renepardon avatar Feb 04 '21 22:02 renepardon

I had the same issue, workaround downgrade "socket.io-client": "2.3.0" in your package.json works fine. Would appreciate a solution with latest 3.x version of socket.io-client.

Oh my, thank you so much! It was driving me nuts late after midnight 🥇

nikitabuida avatar May 01 '21 06:05 nikitabuida

@tlaverdure any update on this issue ? Could you please state to downgrade socket.io-client at 2.3.0 in the Readme : https://github.com/tlaverdure/laravel-echo-server#socketio-client-library ?

lc3t35 avatar May 01 '21 09:05 lc3t35

v2.3.0 worked for me! Can't thank you enough for this. Spent a whole week scouring google and trying everything. I've reconfigured my Vagrant, Redis, Echo Server and Echo client how many times! Worst part is that there was no hint, warning or error anywhere in any log file, or in chrome dev tools. I think this issue is quite significant and really needs to be reinforced on the official guide.

jamieleepreece avatar May 08 '21 18:05 jamieleepreece

Please credit @devsafarian for the finding (on stackoverflow), I just put it back here

Capture d’écran 2021-05-09 à 16 13 47

@tlaverdure could you please just update the Readme ?

lc3t35 avatar May 09 '21 14:05 lc3t35

Cheers @devsafarian! Last thing I though of doing was downgrading... If it helps anyone, I was using v4.0. However, from a bit of poking around open issues, it seems v3 onwards is not supported. I was getting a successful WebSocket connection, but the echo server was not logging any connected users. Channel events were being logged, but my 'connected' client was not receiving them. A simple disclaimer on the master readme would help many other people that ended up in the same boat as me. socket.io-client v2.3.0

jamieleepreece avatar May 09 '21 15:05 jamieleepreece

I had the same issue, workaround downgrade "socket.io-client": "2.3.0" in your package.json works fine. Would appreciate a solution with latest 3.x version of socket.io-client.

thank you very much after along time finally a solution @lc3t35

Alilabib avatar May 29 '21 15:05 Alilabib

Downgrading fixed my problem but now I have 4 vulnerabilities (2 moderate, 1 high, 1 critical) after npm install [email protected] :)

AmirRezaM75 avatar Sep 23 '21 17:09 AmirRezaM75

Thank you All finally problem solved after 3 days.

AsadRazaJutt1 avatar Nov 04 '21 08:11 AsadRazaJutt1

@AsadRazaJutt1

I downgrade package socket.io-client@ from 4.0.4 to 2.3.0 but it not working help me

quanhvpd00567 avatar Nov 27 '21 16:11 quanhvpd00567

Downgrade from 3.* to 2.3.0 has fixed the issue, thanks

Petryashin avatar Feb 01 '22 17:02 Petryashin

The same problem here. I am using laravel 9.11 with [email protected], [email protected] and [email protected]

If I downgrade socket.io-client from 4.5.0 to 2.4.0 it works....

I dont think this is ok ... in terms of security

bci24 avatar May 04 '22 18:05 bci24

The same problem here. I am using laravel 9.11 with [email protected], [email protected] and [email protected]

If I downgrade socket.io-client from 4.5.0 to 2.4.0 it works....

I dont think this is ok ... in terms of security

I get Error: Socket.io client not found. Should be globally available or passed via options.client when I downgrade to this version

sammyaxe avatar May 10 '22 04:05 sammyaxe

Downgrade worked for me too, just have to make sure to import io like this:

import io from "socket.io-client";

versus

import { io } from "socket.io-client"; that is used in later versions of socket-io client

sammyaxe avatar May 10 '22 14:05 sammyaxe

Downgrade worked

marcusblevin avatar Sep 07 '22 02:09 marcusblevin

Downgrade worked [email protected]

derciesto avatar Sep 15 '22 11:09 derciesto

Thank you bros, you saved my time.. it took my half day.

Tushar-Annexlogics avatar Dec 19 '22 05:12 Tushar-Annexlogics

thank you so much

thehigherbounce avatar Feb 13 '23 15:02 thehigherbounce

Im using laravel 10 and when i downgrade socket.io-client from 4.6.2 to 2.3.0, its works. tnhx.

MuriloChianfa avatar Jun 09 '23 00:06 MuriloChianfa