laravel-websockets

Laravel websockets failed to connect in pusher

旧街凉风 提交于 2021-01-29 16:07:29
问题 When I run my project, I got an exception error but it does not have a clear message. I only have this kind of the main body error I can access websocket admin page at http://127.0.0.1:8000/laravel-websockets but when i go http://127.0.0.1:8000/ i got errors below. The following error was encountered while trying to retrieve the URL: http://127.0.0.1:6001/apps/995591/events? Connection to 127.0.0.1 failed. The system returned: (111) Connection refused The remote host or network may be down.

Laravel (Echo, Sanctum, websockets) + Pusher + Nuxtjs SPA

你说的曾经没有我的故事 提交于 2021-01-29 07:33:37
问题 I'm trying to send events to private channel, but I can't receive them. Otherwise it works fine for public channels. Here's my code : Plugin : Echo.js window.Echo = new Echo({ broadcaster: 'pusher', key: process.env.MIX_PUSHER_PUBLIC_KEY, wsHost: process.env.VUE_APP_WEBSOCKETS_SERVER , //window.location.hostname,// cluster: process.env.MIX_PUSHER_APP_CLUSTER, wsPort: 6001, forceTLS: false, /* key: process.env.MIX_ABLY_PUBLIC_KEY, wsHost: 'realtime-pusher.ably.io', wsPort: 443, */ disableStats

Laravel Echo with Pusher and Vue

﹥>﹥吖頭↗ 提交于 2020-06-26 13:57:12
问题 I use Laravel as a server part and Vue Cli as a client. Also I use https://docs.beyondco.de/laravel-websockets/ But I have a errors in console log when i try connect vue client to laravel websockets. WebSocket connection to 'ws://http//websockets.test:6001/app/myKey?protocol=7&client=js&version=5.1.1&flash=false' failed: Connection closed before receiving a handshake response WebSocket connection to 'wss://http//websockets.test:443/app/myKey?protocol=7&client=js&version=5.1.1&flash=false'

Laravel Echo is not listening

旧巷老猫 提交于 2020-06-07 06:27:50
问题 I set up an event and new channel : class TaskCreated implements shouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; public $task; public function __construct(Task $task) { $this->task = $task; } } and installed Echo and set it up import Echo from "laravel-echo" window.Pusher = require('pusher-js'); window.Echo = new Echo({ broadcaster: 'pusher', key: 'pusher-key', cluster: 'ap2', encrypted: true }); then I call the TaskCreated event when a task is posted event(new