Pusher events not working with vanilla JavaScript in Laravel 12 frontend

I’m having trouble getting real-time events to work properly in my Laravel 12 application. I set up Pusher for broadcasting events to the frontend using vanilla JavaScript, but I’m running into some issues.

What’s happening:

  • Events are being dispatched correctly on the backend (I can see them when using the log driver)
  • The frontend JavaScript client isn’t receiving any events
  • Console shows no output when events should be triggered
  • Pusher Debug Console remains empty with no activity

My setup includes:

  • Laravel 12 backend with Pusher broadcasting configured
  • Vanilla JavaScript client for listening to events
  • Proper environment variables set for Pusher credentials
  • Event class created with ShouldBroadcast interface

I’ve double-checked my configuration files and the event seems to be firing on the server side. The connection between frontend and Pusher appears to be the issue. Has anyone experienced similar problems with Pusher integration in Laravel 12? Any suggestions on debugging this further would be helpful.

interesting issue! are you subscribing to the right channel name in your js? laravel’s broadcasting can be tricky with channel naming. what’s your pusher connection status showing? is it connecting at all? check your network tab for failed requests too.

sounds like a cors issue. had the same problem last month. check if your pusher app cluster matches in both your laravel config and js client - that’s what fixed it for me. also try enabling pusher debug mode in js to see the connection logs. really helped me spot the mismatch.

Check your event class implementation carefully. I had the same issue - events seemed to broadcast but nothing hit the frontend. My problem was in the broadcastOn method - I was returning a generic Channel instead of PresenceChannel or PrivateChannel when auth was needed. Also run php artisan route:list to make sure your broadcasting endpoints are actually registered. Another thing that trips people up: Laravel auto-prefixes class names, so if your event is UserUpdated, listen for UserUpdated on the frontend, not user.updated. I’d test with a simple public channel first before adding auth layers.