@shawnyv I have also similar issue, my reverb setup does not run chrome browser, but run on other browsers well(firefox, safari )
Unable to connect to reverb from browser
Hi,
I'm using Reverb now for a couple of months. Everything is working fine, except for the first connection.
In both development and staging environments I have an issue getting the first connection. When I do nothing, the first connection results in a status Finished / Time-out. It keeps retrying to connect, always resulting in a finished with the following trace in the Chrome DevTools window:
WebSocket connection to 'wss://...:6001/app/...?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed:
createWebSocket @...
getSocket @...
connect @...
o @...
emit @...
changeState @...
But I did find a workaround: when I open a new tab in the browser, and open https://...:6001, I get a "Not found" response from the Reverb server. Without refreshing the real webpage I see in the DevTools window that with the next retry the connection is successful and everything is working just fine.
The configuration is Laravel Echo, the lastest Reverb version, Laravel 11. Reverb is listening on port 6001 and directly facing the internet. There is no nginx or other proxy between Reverb and the internet. I've been running reverb in debug mode, but there is no extra information in the logfile.
Anybody an idea what is causing this and how this can be solved?
Not the prefered way, but a solution would be to be able to detect the failing connection at the client, and do a one time request to the https://...:6001 url. Does anybody know how I can detect the failing connection?
The following code does not trigger the console.error call.
window.Echo = new Echo({
broadcaster: 'reverb',
key: process.env.MIX_REVERB_APP_KEY,
wsHost: window.location.hostname,
wsPort: process.env.MIX_REVERB_PORT,
wssPort: process.env.MIX_REVERB_PORT,
forceTLS: true,
disableStats: true,
encrypted: true,
enabledTransports: ['ws','wss'],
});
window.Echo.connector.pusher.connection.bind('error', function(err) {
console.error( 'Websocket connection error: ', err );
});
Please or to participate in this conversation.