After a break (and beer) I finally found the solution: I forgot the namespace. From the Pusher console you have to add App\ (or you custom namespace) in front of the Event.
Aug 24, 2016
3
Level 1
Echo broadcast event listener not being triggered
I'm currently trying to set up broadcasting via Pusher in Laravel 5.3 and have come across a problem with laravel-echo. When pushing something using the Pusher console to my private channel, I can see the event being received by looking at the received frames:
https://i.imgur.com/fu3GBbe.png
My event handler is listening for the "CriticalStateCreated" event:
import Echo from "laravel-echo"
window.Echo = new Echo({
broadcaster: 'pusher',
key: 'redacted',
cluster: 'eu'
});
window.Echo.private('critical-states')
.listen('CriticalStateCreated', (e) => {
console.log(e);
});
So I know that Echo is successfully receiving incoming Pusher broadcasts and the event name matches my event handler. Why don't I see anything in my debug console?
Please or to participate in this conversation.