code-chat-br / whatsapp-api

CodeChat - WhatsApp Api
https://docs.codechat.dev
Apache License 2.0
601 stars 243 forks source link

Disconnections occurring frequently #44

Closed fhonline closed 11 months ago

fhonline commented 1 year ago

being precise, since 2023/06/28 there have been disconnections of instances already connected, I use docker + redis... it was working perfectly, but since the last 3 days disconnections have occurred for no reason, without origin, the user has to go there and connect again.

jrCleber commented 1 year ago

This Api abstracts the features of the @whiskeysockets/baileys library, which is responsible for communication with WhatsApp, and encapsulates them into methods that are executed at the time a request is made. Failures in connection with WhatsApp, spontaneous reconnection, among other problems that are directly related to WhatsApp should be addressed here @whiskeysockets/baileys:issues. Suggestions and pulls for the solution of this problem will be analyzed, and if viable, implemented.

fhonline commented 1 year ago

I understand, but the post here would be for us to find a way for this not to happen, because the connection is "sleeping" and the user just needs to start the session again, then he doesn't even need to read the qrcode, it's back to working.... even to make matters worse, the webhook is cleared, having to define it again after it starts... is there no way to find out the reason for "sleeping" the connection and do some artifice for this not to happen?

fhonline commented 1 year ago

I believe it is a new behavior of whatsapp, in sleeping the connection... wouldn't there be a way to keep the connection always on alert? The test is simple: connect your whatsapp to the api, and stay without interaction in the api for a few hours... then try to interact, from the INSTANCE NOT EXISTS message... then you start "INIT" and it works again.

grdamasceno commented 1 year ago

being precise, since 2023/06/28 there have been disconnections of instances already connected, I use docker + redis... it was working perfectly, but since the last 3 days disconnections have occurred for no reason, without origin, the user has to go there and connect again.

O facing the same problem

luizeof commented 1 year ago

@fhonline @grdamasceno see https://github.com/code-chat-br/whatsapp-api/issues/45

grdamasceno commented 1 year ago

@fhonline @grdamasceno see https://github.com/code-chat-br/whatsapp-api/issues/45

Tks