Use another client that Pusher with Websocket

I would like to use Soketi for websocket (database notification) on Admin Panel but I can't. Everything is well configured on Laravel (on my not-filament application it is ok). The configuration :
'database_notifications' => [
'enabled' => true,
'polling_interval' => null,
'trigger' => 'notifications.database-notifications-trigger',
],

'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'forceTLS' => true,
],

],
'database_notifications' => [
'enabled' => true,
'polling_interval' => null,
'trigger' => 'notifications.database-notifications-trigger',
],

'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'forceTLS' => true,
],

],
But, Pusher persist on Admin Panel : wss://ws-mt1.pusher.com/app/app-key?protocol=7&client=js&version=7.6.0&flash=false Can you help me please ?
9 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Dan Harrin
Dan Harrin2y ago
unless you can show me where in the Filament codebase we have hard-coded a Pusher URL, I think this has to be a configuration issue?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Dan Harrin
Dan Harrin2y ago
We're using pusher-js lib, do we need to pass a different URL into that?
JohnnyC
JohnnyCOP2y ago
@mmte_ I did not find a solution and I left aside for the moment. Yes, from echo.js there is hard-coded a Pusher URL :
function Fe(t) {
return "ws-" + t + ".pusher.com"
}
function Fe(t) {
return "ws-" + t + ".pusher.com"
}
Can be a solution : https://laravel.com/docs/10.x/broadcasting#using-an-existing-client-instance
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
JohnnyC
JohnnyCOP2y ago
Ok nice ! It seems to work, thank you 🙂 I will test in depth when I can. Perhaps it should be added in the documentation ?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Matt Jenkins
Matt Jenkins14mo ago
Just adding to this as it helped me find a solution for filament v3. You need to first uncomment App\Providers\BroadcastServiceProvider::class in config/app.php and also comment out authEndpoint in config/filament.php so it looks something like this:
'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'wsHost' => env('VITE_PUSHER_HOST'),
'wsPort' => env('VITE_PUSHER_PORT'),
'wssPort' => env('VITE_PUSHER_PORT'),
//'authEndpoint' => '/api/v1/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
],

],
'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'wsHost' => env('VITE_PUSHER_HOST'),
'wsPort' => env('VITE_PUSHER_PORT'),
'wssPort' => env('VITE_PUSHER_PORT'),
//'authEndpoint' => '/api/v1/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
],

],
Not sure why the endpoint is set to that and I may be missing something but this worked for me, locally at least!
Want results from more Discord servers?
Add your server