2017-07-06 129 views
1

我使用的推進器在Laravel 5.4,但我得到以下錯誤:Laravel 5.4推杆錯誤

WebSocket connection to 'ws://ws.pusherapp.com/app/731e32c5f123456298e?protocol=7&client=js&version=4.1.0&flash=false' failed: WebSocket is closed before the connection is established.

Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4001,"message":"Did you forget to specify the cluster when creating the Pusher instance? App key 731e32c5f123456298e does not exist in this cluster."}}}

+0

你忘了指定創建時集羣推送實例? –

回答

1

它看起來像您複製好推app_key不正確。推應用程序鍵通常有20個字符,你有19

+0

對不起,應用程序鍵是好的,我已經改變了錯誤的關鍵。 –

+0

您的應用位於哪個羣集?例如:'mt1' /'eu' /'ap1' – leesio

1
'pusher' => [ 
     'driver'  => 'pusher', 
     'key'   => env('PUSHER_KEY'), 
     'secret'  => env('PUSHER_SECRET'), 
     'app_id'  => env('PUSHER_APP_ID'), 
     'options' => [ 
      'cluster'  => <your cluster> , 
      'encrypted' => true, 
     ], 
    ], 

指定集羣

但是

如果你是在本地主機上測試加密應該是假的

+0

但是如果你在本地主機上測試加密應該是false –