laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
921 stars 62 forks source link

Laravel Reverb throw an error when stop using keyboard #90

Closed fftfaisal closed 3 months ago

fftfaisal commented 3 months ago

Reverb Version

1.0.0-beta2

Laravel Version

11.0.6

PHP Version

8.3.1

Description

I have installed fresh laravel 11.0.6 with jetstream vue stack. Then I install the reverb package.

After that I start reverb server using php artisan reverb:start also php artisan reverb:start --debug . When I try to stop server using keyboard ctrl + c it take a bit time then throw the following error. I attached the screenshot with error details

2024-03-15_145033



   INFO  Starting server on 0.0.0.0:8080.

   INFO  Gracefully terminating connections.  

   TypeError 

  Laravel\Reverb\ConfigApplicationProvider::findById(): Argument #1 ($id) must be of type string, null given, called in F:\laragon\www\laravel11\vendor\laravel\reverb\src\ConfigApplicationProvider.php on line 27

  at vendor\laravel\reverb\src\ConfigApplicationProvider.php:36
     32▕      * Find an application instance by ID.
     33▕      *
     34▕      * @throws \Laravel\Reverb\Exceptions\InvalidApplication
     35▕      */
  ➜  36▕     public function findById(string $id): Application
     37▕     {
     38▕         return $this->find('app_id', $id);
     39▕     }
     40▕

  1   vendor\laravel\reverb\src\ConfigApplicationProvider.php:27
      Laravel\Reverb\ConfigApplicationProvider::findById()

  2   [internal]:0
      Laravel\Reverb\ConfigApplicationProvider::Laravel\Reverb\{closure}()```

### Steps To Reproduce

Github repo : https://github.com/fftfaisal/laravel11
fftfaisal commented 3 months ago

The issue has been solved after putting the reverb environment variables

REVERB_APP_ID=my-app-id
REVERB_APP_KEY=my-app-key
REVERB_APP_SECRET=my-app-secret