Laravel 5.4推送器错误

我在Laravel 5.4中使用推送器,但是出现以下错误:

WebSocket连接到'ws://ws.pusherapp.com/app/731e32c5f123456298e?protocol = 7&client = js&version = 4.1.0&flash = false'失败:WebSocket在连接build立之前closures。

Pusher错误:{“type”:“WebSocketError”,“error”:{“type”:“PusherError”,“data”:{“code”:4001,“message”:“你忘了指定集群时创buildPusher实例?应用程序密钥731e32c5f123456298e在此群集中不存在。“}}}

看起来你错误地复制了推送器app_key 。 推送器应用程序键通常有20个字符,你有19个。

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

指定您的群集

但是如果你在localhost上进行testing,encryption应该是错误的

Interesting Posts