title: Laravel WebSockets: Subscribing to private channels does not work
body: <p><strong>Software:</strong></p>
  
  <ul>
  <li>Laravel 5.8</li>
  <li><a href="https://docs.beyondco.de/laravel-websockets/" rel="nofollow noreferrer">Laravel WebSockets 1.1</a></li>
  <li>Vue 2.6.10</li>
  </ul>
  
  <p>In websockets.php (<a href="https://textuploader.com/1otrn" rel="nofollow noreferrer">complete file</a>) I have my <code>local_cert</code> and <code>local_pk</code> setup with my certificates. If I leave this option blank I cannot even connect. I also have set <code>verify_peer</code>to <code>false</code>, because if I don't I cannot connect either.</p>
  
  <p><strong>broadcasting.php:</strong></p>
  
  <pre><code>'pusher' =&gt; [
          'driver' =&gt; 'pusher',
          'key' =&gt; env('PUSHER_APP_KEY'),
          'secret' =&gt; env('PUSHER_APP_SECRET'),
          'app_id' =&gt; env('PUSHER_APP_ID'),
          'options' =&gt; [
              'cluster' =&gt; env('PUSHER_APP_CLUSTER'),
              'host' =&gt; '127.0.0.1',
              'port' =&gt; 6001,
              'scheme' =&gt; 'https',
              'curl_options' =&gt; [
                  CURLOPT_SSL_VERIFYHOST =&gt; 0,
                  CURLOPT_SSL_VERIFYPEER =&gt; 0,
              ]
          ],
      ],
  </code></pre>
  
  <p>If I get rid of the curl options I get an empty Broadcast exception <a href="https://github.com/beyondcode/laravel-websockets/issues/152" rel="nofollow noreferrer">like described here</a>.</p>
  
  <p><strong>bootstrap.js:</strong></p>
  
  <pre><code>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,
      auth: {
          headers: {
              'X-CSRF-TOKEN': window.App.csrfToken,
          },
      },
  })
  </code></pre>
  
  <p>This is all I get from the logs after running <code>php artisan websockets:serve</code>:</p>
  
  <pre><code>New connection opened for app key 7d23096ae0ab2d02d220.
  Connection id 49092664.114416323 sending message {"event":"pusher:connection_established","data":"{\"socket_id\":\"49092664.114416323\",\"activity_timeout\":30}"}
  </code></pre>
  
  <p>What I should get is messages about listening / joining channels and sending messages etc. But all of that does not work at the moment. I have things like:</p>
  
  <pre><code>Echo.private('notifications.' + this.user.id)
                  .listen('UserNotificationSent', (e) =&gt; {
                      console.log(e)
                  })
  </code></pre>
  
  <p>Events: <a href="https://textuploader.com/1od1t" rel="nofollow noreferrer">UserNotificationSent.php</a> for example.</p>
  
  <p>Of course internally I have everything else setup as well: channels with auth, etc. Everything worked locally on my machine on a lower Laravel version (5.4). But I recently updated to 5.8 and deployed to a server and now I struggle with this.</p>
  
  <p>I also <a href="https://github.com/beyondcode/laravel-websockets/issues/289" rel="nofollow noreferrer">opened an issue on github</a>.</p>
  
  <p><strong>IMPORTANT UPDATE</strong>
  This is actually not due to the deployment, I have the same problem on my local setup. What is interesting is that listening to channels via <code>Echo.channel()</code> works, however, <code>.private()</code> is not working. On Github (link above) I came across a guy who has the exact same problem. We did not find a solution yet.</p>