Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dev.khosromanesh's avatar

Laravel Echo does not received message from channel

i stuck very bad . in realtime laravel(version 9) project using pusher for websocket. backend can get message but problem is Echo does not received message which sent from backend ...

Event :

class MessageSent implements ShouldBroadcast
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public $message ;
    public function __construct($message){
        $this->message=$message;
    }

    public function broadcastOn()
    {
        \Log::debug("{$this->message}");
        return new Channel('chat');
    }

    public function broadcatAs(){
        return 'chat';
    }
}

JS :

 Echo.channel('.chat').listen('MessageSent', (e) => {
        alert(e.message)
    });

further information :

1- according to Event i can log message to laravel.log file which means message sent from frontend to backend .

2-there is no error in console area

3-3-see debug console of pusher official site debug console -> https://i.stack.imgur.com/57dV3.png

0 likes
8 replies
Sinnbeck's avatar

Are you using the real pusher or running your own server?

If using the real pusher, check their page to see if the message is received (I dont use them anymore but recall that you can see a log of all messages)

Sinnbeck's avatar

@dev.khosromanesh Ok. Open the network tab and change it to the sub-tab named "WS". reload the page and click on the connection to pusher. Check the messages to the right

dev.khosromanesh's avatar

@Sinnbeck we have one message there and everytime i click on the connection to pusher no more message received

{"event":"pusher:error","data":{"code":4001,"message":"App key 38dc4238ea832ce51130 not in this cluster. Did you forget to specify the cluster?"}}
dev.khosromanesh's avatar

@Sinnbeck completely copy credentials of pusher to env file , when i change any credential like app id or cluster i got error in console and response error 500

so what should i do

i stuck in this error from two days ago

Please or to participate in this conversation.