You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a subscription request is received by Reverb, it throws the following error:
TypeErrorLaravel\Reverb\Protocols\Pusher\EventHandler::subscribe(): Argument#4 ($data) must be of type ?string, array given, called in /var/www/DemoGraphQL/vendor/laravel/reverb/src/Protocols/Pusher/EventHandler.php on line 29 at vendor/laravel/reverb/src/Protocols/Pusher/EventHandler.php:56
The error is caused by the payload data being an array instead of a string, which is expected by the subscribe method in the EventHandler class.
The payload that triggers the error looks like this:
The authorizedMethod in the EchoBroadcaster Class should send an string for 'channel_data' instead an array.
Steps to reproduce
Starting laravel reverb
Add an Subscription to the Frontend
Output/Logs
Laravel Exception
TypeError
Laravel\Reverb\Protocols\Pusher\EventHandler::subscribe(): Argument #4 ($data) must be of type ?string, array given, called in /Users/dev/Herd/lv-ep-gw-api/vendor/laravel/reverb/src/Protocols/Pusher/EventHandler.php on line 29
at vendor/laravel/reverb/src/Protocols/Pusher/EventHandler.php:56
52▕
53▕ /**
54▕ * Subscribe to the given channel.
55▕ */
➜ 56▕ public function subscribe(Connection $connection, string $channel, ?string $auth = null, ?string $data = null): void
57▕ {
58▕ $channel = $this->channels
59▕ ->for($connection->app())
60▕ ->findOrCreate($channel);
Lighthouse Version
6.36.3
The text was updated successfully, but these errors were encountered:
I don't know if older versions required an array. Maybe you can add a new Driver for laravel reverb, that can be set like this: LIGHTHOUSE_BROADCASTER=reverb in the config.
When a subscription request is received by Reverb, it throws the following error:
The error is caused by the payload data being an array instead of a string, which is expected by the subscribe method in the EventHandler class.
The payload that triggers the error looks like this:
The
authorized
Method in theEchoBroadcaster
Class should send an string for 'channel_data' instead an array.Steps to reproduce
Output/Logs
Laravel Exception
Lighthouse Version
6.36.3
The text was updated successfully, but these errors were encountered: