-
Notifications
You must be signed in to change notification settings - Fork 98
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
Reverb process crashes if no $auth parameter is provided #89
Comments
Can you put more information? |
Hey there, thanks for reporting this issue. We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here? Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.
Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue. Thanks! |
Sorry, I have tried to reproduce the issue from within laravel but I am unsure on how to trigger it during local testing. In production I have thousands of clients connecting to the websocket server and I am guessing that under some specific condition the $auth variable is left unasigned and gets set to null because thats the default value. My only solution would be to undo my changes in production and perhaps capture the info from the connecting client, they might be using an outdated installation of Echo or something like that. In any case, feel free to close this issue as I am unable to reproduce it locally. |
I am also experiencing the same issue but in local environment.
added this to api route file:
the channel :
frontend echo configuration: `import Echo from "laravel-echo"; window.Pusher = require('pusher-js');
})} |
Hey @KirinyetBrian can you share a screenshot of the WebSocket in the network panel expanding the detail of the |
the type error issues was was fixed by the recent merge done by @taylorotwell but now client can't subscribe to private channels here is the network panel and also events published to public channel doesnt seem to be broadcast by reverb to laravel echo(client): |
@KirinyetBrian are you passing an auth token when connecting to the private channel? |
Reverb Version
v1.0.0-beta3
Laravel Version
v11.0.6
PHP Version
8.3
Description
After putting reverb into production and replacing soketi everything worked fine for an hour and then I started receiving these errors which crash the reverb process:
2024-03-15 02:16:37] production.ERROR: Laravel\Reverb\Protocols\Pusher\Channels\PrivateChannel::verify(): Argument #2 ($auth) must be of type string, null given, called in /home/forge/xxxxxx/vendor/laravel/reverb/src/Protocols/Pusher/Channels/Concerns/InteractsWithPrivateChannels.php on line 16 {"exception":"[object] (TypeError(code: 0): Laravel\Reverb\Protocols\Pusher\Channels\PrivateChannel::verify():
I have fixed the error temporarily by modifying the signature of the verify method to match the subscribe method however I am unsure if this is the correct way to fix this issue:
protected function verify(Connection $connection, ?string $auth = null, ?string $data = null): bool
Steps To Reproduce
Pass a null $auth parameter while trying to connect to a private channel
The text was updated successfully, but these errors were encountered: