[英]Laravel 5.4 pusher error
I am using pusher in Laravel 5.4 but I'm getting following error: 我在Laravel 5.4中使用了pusher,但出现以下错误:
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. WebSocket与“ ws://ws.pusherapp.com/app/731e32c5f123456298e?protocol = 7&client = js&version = 4.1.0&flash = false”的连接失败:WebSocket在建立连接之前已关闭。
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."}}} Pusher:错误:{“ type”:“ WebSocketError”,“ error”:{“ type”:“ PusherError”,“ data”:{“ code”:4001,“ message”:“”当您忘记指定群集时,要创建Pusher实例吗?此群集中不存在应用程序密钥731e32c5f123456298e。“}}}
It looks like you've copied your pusher app_key
incorrectly. 您app_key
错误地复制了推送程序app_key
。 Pusher app keys typically have 20 characters, yours has 19. Pusher应用程序密钥通常有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,
],
],
Specify your cluster 指定您的集群
however if you are testing on localhost encrypted should be false 但是,如果您在本地主机上测试,则加密应该为false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.