F
Filament2mo ago
Nuxnux

Run into a problem setting up reverb for notification

Here the step i make
'broadcasting' => [

'echo' => [
'broadcaster' => 'reverb',
'key' => env('VITE_REVERB_APP_KEY'),
'cluster' => env('VITE_REVERB_APP_CLUSTER'),
'wsHost' => env('VITE_REVERB_HOST'),
'wsPort' => env('VITE_REVERB_PORT'),
'wssPort' => env('VITE_REVERB_PORT'),
'authEndpoint' => '/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
'forceTLS' => false,
],

],
'broadcasting' => [

'echo' => [
'broadcaster' => 'reverb',
'key' => env('VITE_REVERB_APP_KEY'),
'cluster' => env('VITE_REVERB_APP_CLUSTER'),
'wsHost' => env('VITE_REVERB_HOST'),
'wsPort' => env('VITE_REVERB_PORT'),
'wssPort' => env('VITE_REVERB_PORT'),
'authEndpoint' => '/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
'forceTLS' => false,
],

],
i change those in filament.php config it works perfectly on dev but on production i get this error
echo.js?v=3.2.116.0:2 Uncaught You must pass your app key when you instantiate Pusher.
echo.js?v=3.2.116.0:2 Uncaught You must pass your app key when you instantiate Pusher.
my .env is setup properly and from what is see the Echo instance is not properly construct
window.Echo = new window.EchoFactory(JSON.parse('{\u0022broadcaster\u0022:\u0022reverb\u0022,\u0022key\u0022:null,\u0022cluster\u0022:null,\u0022wsHost\u0022:null,\u0022wsPort\u0022:null,\u0022wssPort\u0022:null,\u0022authEndpoint\u0022:\u0022\\\/broadcasting\\\/auth\u0022,\u0022disableStats\u0022:true,\u0022encrypted\u0022:true,\u0022forceTLS\u0022:false}'))

window.dispatchEvent(new CustomEvent('EchoLoaded'))

window.Echo = new window.EchoFactory(JSON.parse('{\u0022broadcaster\u0022:\u0022reverb\u0022,\u0022key\u0022:null,\u0022cluster\u0022:null,\u0022wsHost\u0022:null,\u0022wsPort\u0022:null,\u0022wssPort\u0022:null,\u0022authEndpoint\u0022:\u0022\\\/broadcasting\\\/auth\u0022,\u0022disableStats\u0022:true,\u0022encrypted\u0022:true,\u0022forceTLS\u0022:false}'))

window.dispatchEvent(new CustomEvent('EchoLoaded'))

Here everything is set to null which result to this error Did i miss any steps ?
8 Replies
ChesterS
ChesterS2mo ago
Is you env setup correctly in production? As in, do you have an app key?
Nuxnux
NuxnuxOP2mo ago
yes here it is
REVERB_APP_ID=
REVERB_APP_KEY=
REVERB_APP_SECRET=
REVERB_HOST=mydomain without https://
REVERB_PORT=443
REVERB_SCHEME=https
REVERB_SERVER_PORT=8082
REVERSE_SERVER_HOST=127.0.0.1
REVERB_APP_ID=
REVERB_APP_KEY=
REVERB_APP_SECRET=
REVERB_HOST=mydomain without https://
REVERB_PORT=443
REVERB_SCHEME=https
REVERB_SERVER_PORT=8082
REVERSE_SERVER_HOST=127.0.0.1
it's works outside filament with this setup
ChesterS
ChesterS2mo ago
I assume these values are not empty in production?
Nuxnux
NuxnuxOP2mo ago
yeah sure i just delete those
ChesterS
ChesterS2mo ago
So something like this
BROADCAST_DRIVER=reverb

REVERB_APP_ID=my-app-id
REVERB_APP_KEY=my-app-key
REVERB_APP_SECRET=my-app-secret
REVERB_HOST="localhost"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
BROADCAST_DRIVER=reverb

REVERB_APP_ID=my-app-id
REVERB_APP_KEY=my-app-key
REVERB_APP_SECRET=my-app-secret
REVERB_HOST="localhost"
REVERB_PORT=8080
REVERB_SCHEME=http

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
Nuxnux
NuxnuxOP2mo ago
for here but there are feed yeah sure exactly just add the REVER_SERVER_HOST and PORT for traefik
ChesterS
ChesterS2mo ago
Hmm not sure. The error suggests that the app key is not there. Maybe some config problem or setup issue? I assume everything is up-to-date
Nuxnux
NuxnuxOP2mo ago
yup everything up to date whats weird is that it is instantiate properly outside filament
Want results from more Discord servers?
Add your server