reverb: Don't connect the form to the server socket
Reverb Version
1.0@beta
Laravel Version
v11.0.5
PHP Version
8.3
Description
I tried with the Postman and is connected well and returns the data and socket ID but javascript does not work I don’t know where the issue
env file
APP_URL=https://reverb.test
BROADCAST_CONNECTION=reverb
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REVERB_APP_ID=218623
REVERB_APP_KEY=laravel-key
REVERB_APP_SECRET=laravel-secret
REVERB_HOST="reverb.test"
REVERB_PORT=8080
REVERB_SCHEME=https
VITE_APP_NAME="${APP_NAME}"
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
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: import.meta.env.VITE_REVERB_HOST,
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
enabledTransports: ['ws', 'wss'],
});
Steps To Reproduce
…
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 47 (18 by maintainers)
I also encountered this using Laravel Sail (Windows, WSL, Laravel 10 upgraded to 11).
By adding port 8080 (used by Reverb) to docker-compose.yml solved the problem.
I have exactly the same problem
Web server: Lightspeed Laravel: version 11
error :
app-CamLVODr.js:13 WebSocket connection to 'wss://mydomain.com/app/cmjnsrygmqfjkdrsmxib?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed:After update broadcast.php, the connection has return this, i`m continue trying.
@joedixon - Apologies, I should have made it clearer above - I changed the
0.0.0.0to myreverb-test.testdomain and that worked on ahttpconnection, but SSL still has issues when tryinghttps. However I think you’ve cleared it up with the following statement above