I created a private channel using Pusher and it successfully subscribed to it on my local machine. But when I deployed the solution on my server it didn’t work. the /broadcasting/auth returns 200 ok but I can’t see the auth token in the request preview.
normally the Pusher will subscribe to the private channel then after the auth request I will render my data but it’s stuck on the auth request i had this error on the console on the integration server : “Error: JSON returned from channel-authorization endpoint was invalid, yet status code was 200. Data was: “]
i tried php artisan config:clear
but nothing has changed.
everything is set correctly : i updated the app.php file to uncomment the
BroadcastingBroadcastServiceProvider::class
and my .env file of the integration server and the broadcast_driver to pusher but still getting the same console error .
this is my Bootstrap.js file :
import Echo from 'laravel-echo';
window.Pusher = require('pusher-js');
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
forceTLS: true
});