2017-07-06 128 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 –