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

reverb:start failed after 60 sec with no activity #306

Open
bci24 opened this issue Feb 4, 2025 · 0 comments
Open

reverb:start failed after 60 sec with no activity #306

bci24 opened this issue Feb 4, 2025 · 0 comments

Comments

@bci24
Copy link

bci24 commented Feb 4, 2025

Reverb Version

1.4.6

Laravel Version

11.41.3

PHP Version

8.3.16

Description

I want to replace the laravel-websockets with laravel reverb.

I configured a fresh laravel application with reverb to use multiple apps. When starting the server, everything works fine but if there is no activity in 60 seconds, it will throw an exception.

  1. Starting the reverb server:

php artisan reverb:start --debug

and open the application within 60 seconds:

INFO  Starting secure server on 0.0.0.0:6200.

Connection Established ....................................................................................................... 949324983.948079600  
Message Received ............................................................................................................. 949324983.948079600

1 {

2     "event": "pusher:subscribe",

3     "data": {

4         "auth": "",

5         "channel": "application"

6     }

7 }


  Message Handled .............................................................................................................. 949324983.948079600
  Message Received ............................................................................................................. 949324983.948079600  
  
1 { 

2     "event": "pusher:ping", 

3     "data": [] 

4 }


Message Handled .............................................................................................................. 949324983.948079600  
Pruning Stale Connections ........................................................................................................................  

is working fine...as you can see, the subscription is successful, but if there is no activity from the application for 60 seconds, the server will crash:

TypeError 

Laravel\Reverb\ConfigApplicationProvider::findById(): Argument #1 ($id) must be of type string, null given, called in C:\www\Reverb_Server\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

Start the server and do not open any application within 60 seconds, in order the app to not subscribe.

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

No branches or pull requests

1 participant