Dec 27, 2024
0
Level 1
Echo can't connect to Reverb?
I've configured Reverb as per the docs but it fails to connect with no interesting error message (and reverb server isn't saying anything either).
It simply does:
WebSocket connection to 'ws://localhost:8080/app/aiventures-key-123?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed:
Testing the exact URL with the testing tool wscat npm install -g wscat shows it works fine:
wscat -c "ws://localhost:8080/app/aiventures-key-123?protocol=7&client=js&version=8.4.0-rc2&flash=false"
Connected (press CTRL+C to quit)
< {"event":"pusher:connection_established","data":"{\"socket_id\":\"862269706.261924261\",\"activity_timeout\":30}"}
And from Reverb output:
Connection Established ................................................................. 711630145.489289014
Control Frame Received ................................................................. 711630145.489289014
1▕ null
Connection Closed
Not sure what's going on. Looks like it's configured correctly since Echo is using the correct URL.
Here's resources/js/echo.js:
import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: 'localhost',
wsPort: 8080,
wssPort: 8080,
forceTLS: false,
enabledTransports: ['ws', 'wss'],
});
Help? :(
Please or to participate in this conversation.