Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have issue in reverb broadcasting with Laravel Forge #184

Closed
rahmani-djamel opened this issue May 3, 2024 · 5 comments
Closed

I have issue in reverb broadcasting with Laravel Forge #184

rahmani-djamel opened this issue May 3, 2024 · 5 comments
Assignees

Comments

@rahmani-djamel
Copy link

Reverb Version

@beta

Laravel Version

11.0

PHP Version

8.3

Description

I have a strange issue with reverb it works locally but it is not in production with no error log. I'm using Laravel Forge and this is my .env file

BROADCAST_DRIVER=reverb
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync

REVERB_HOST=ws.***.co
REVERB_PORT=443
REVERB_SCHEME="https"
REVERB_SERVER_PORT=8080

websocket issue

but when I broadcast event locally it show on my browser console but in live it didn't I check laravel telescope and I found the event so the issue in the the connection between echo and reverb

how to fix that ?

Steps To Reproduce

reverb_issue

@rahmani-djamel
Copy link
Author

more reverb
more1
more2

window.Echo.channel('upload.')
.listen('.upload-completed', (event) => {
console.log(event);
console.log("success");
});

I tested the connection in Postman and it worked

{
    "event": "pusher:connection_established",
    "data": "{\"socket_id\":\"456890587.966221455\",\"activity_timeout\":30}"
}

which kind of information I can provide more

@joedixon
Copy link
Collaborator

joedixon commented May 3, 2024

Hey @rahmani-djamel do you see any errors in you application logs or failed jobs table?

@rahmani-djamel
Copy link
Author

rahmani-djamel commented May 3, 2024

hi @joedixon no errors in the console or the log file no failed job records I create a route to fire the event

Route::get('/test-event', function () { 
    event(new \App\Events\UploadCompleted(1));
    return 'Event has been sent!';
});

and locally no errors and it works fine but In production 0 errors and not work



should I provide more information? please specify the information you want.

@joedixon
Copy link
Collaborator

joedixon commented May 3, 2024

On Laravel 11, I believe the broadcast environment variable should be BROADCAST_CONNECTION= rather than BROADCAST_DRIVER= as you have listed in your original post.

@rahmani-djamel
Copy link
Author

yes that was exactly the issue thank you @joedixon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants