user10060106
user10060106

Reputation:

laravel websockets cannot be served

I am trying to use websockets following the documentation of https://docs.beyondco.de/laravel-websockets/ after typing "php artisan websockets:serve" i get this following error

Whoops\Exception\ErrorException : Class BeyondCode\LaravelWebSockets\Statistics\DnsResolver may not inherit from final class (React\Dns\Resolver\Resolver)

Upvotes: 1

Views: 780

Answers (1)

PtrTon
PtrTon

Reputation: 3835

The issue you encounter is caused by a backwards incompatible change in the React\Dns package causing the BeyondCode\LaravelWebSockets package to fail. Others have reported this issue on github as well. The solution for this would be to downgrade the React\Dns package, until BeyondCode\LaravelWebSockets fixes this issue themselves. Downgrading can be done like so:

composer require react/dns:^0.4.19

After you've done so try running php artisan websockets:serve again to see if the issue is resolved.

Upvotes: 1

Related Questions