Can't connect to private Echo channels
Connection to websockets is successful, however I can't connect to any channels. Strange enough, I have the exact same setup on another MacBook and it works perfectly fine there. Just did a git pull, composer update, npm install and update, etc. and I'm now stuck here. What might be the reason for it to work on one MacBook but not on the other? SSL certificates for Laravel Valet seem fine, otherwise I couldn't establish a connection whatsoever anyway I guess.
MacOS Mojave
Laravel Valet with secure site
App.vue part:
Echo.private('notifications.' + this.user.id)
.listen('MessageNotificationSent', (e) => {
console.log(e)
})
bootstrap.js part:
window.Pusher = require('pusher-js');
window.Echo = new Echo({
broadcaster: 'pusher',
key: '7d23096ae0ab2d02d220',
wsHost: window.location.hostname,
wsPort: 6001,
wssPort: 6001,
encrypted: true,
disableStats: true,
enabledTransports: ['ws', 'wss'],
})
broadcast.php part:
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'host' => '127.0.0.1',
'port' => 6001,
'scheme' => 'https',
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
]
],
],
websockets.php:
'ssl' => [
'local_cert' => '/Users/..../.config/valet/Certificates/foraum.test.crt',
'local_pk' => '/Users/.../.config/valet/Certificates/foraum.test.key',
'passphrase' => null,
'verify_peer' => false,
],
Never mind. It didn't pull the .env file inside of which I forgot to say "BROADCAST_DRIVER=pusher"