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
{{ message }}
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
Hello, I'm having a problem with laravel-websockets, don't know if it's the server or the client, but here it goes:
I'm using an ionic capacitor mobile application with laravel-echo and pusher, when I first connect with the socket, everything works great, but in case of a disconnection or if I close the app and open again, It simply does not connect, the issue is even strange than that in the client side it says connect, and it receives ping and pong events and even has an socket id, but in the dashboard does not appear that the client has connected and if I try to send an event from the dashboard or Laravel application it does not work, It works in the following pattern: the first time it connects in a right way receives all events, after it connects the wrong way it says in the client that is connected, but it does not receives any event.
The second time connection can be anything, a disconnect, if I close the app from the background, anything, even with airplane mode.
This is already the second time I tried to connect, as you can see It connects the first time in a right way, than the second time does not show at the dashboard, as you can see I sent an event but it does not receives in the client.
This is the websocket inspect page for this second connect, as you can see it receives ping pong events, it does show that subscribed but it does not receives events:
Now with another disconnect and connect, as you can see it works flawlessly, I don't know why:
Client screenshot receiving the event (when connected the right way):
This is my pusher config from laravel, in the server, I can reproduce this in two differente apps, using the same server:
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'pusher'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'), // Key
'secret' => env('PUSHER_APP_SECRET'), // Secret
'app_id' => env('PUSHER_APP_ID'), // An app ID
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),// Here I put mt1
'host' => 'websockets',
'port' => 6001,
'scheme' => 'http',
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
If anyone has any guesses what I'm doing wrong, It would be really thankful. Thanks a lot for the team of laravel-websockets It is a really great job.
The text was updated successfully, but these errors were encountered:
Do you have stale connections being closed when you terminate the websocket server?
You could test the redis backend and see if the problem is fixed there, the local Channelmanager seems to have a issue
Hello, I'm having a problem with laravel-websockets, don't know if it's the server or the client, but here it goes:
I'm using an ionic capacitor mobile application with laravel-echo and pusher, when I first connect with the socket, everything works great, but in case of a disconnection or if I close the app and open again, It simply does not connect, the issue is even strange than that in the client side it says connect, and it receives ping and pong events and even has an socket id, but in the dashboard does not appear that the client has connected and if I try to send an event from the dashboard or Laravel application it does not work, It works in the following pattern: the first time it connects in a right way receives all events, after it connects the wrong way it says in the client that is connected, but it does not receives any event.
The second time connection can be anything, a disconnect, if I close the app from the background, anything, even with airplane mode.

This is already the second time I tried to connect, as you can see It connects the first time in a right way, than the second time does not show at the dashboard, as you can see I sent an event but it does not receives in the client.This is the websocket inspect page for this second connect, as you can see it receives ping pong events, it does show that subscribed but it does not receives events:

Now with another disconnect and connect, as you can see it works flawlessly, I don't know why:

Client screenshot receiving the event (when connected the right way):

This is my pusher config from laravel, in the server, I can reproduce this in two differente apps, using the same server:
If anyone has any guesses what I'm doing wrong, It would be really thankful. Thanks a lot for the team of laravel-websockets It is a really great job.
The text was updated successfully, but these errors were encountered: