whatsapp-api icon indicating copy to clipboard operation
whatsapp-api copied to clipboard

Session is not persistent

Open andrew-belyi opened this issue 5 months ago • 0 comments

General principle of use: I use this package for a chat bot that collects messages from many different groups, performs some data processing and in some cases sends the message to one specific group. That is, I receive messages from many groups, send only to one. I do not use any other functionality.

Binding a session:

  1. Create a session
  2. Scan the QR code from working phone

My .env configuration DISABLED_CALLBACKS=call|change_state|group_join|group_leave|group_update|loading_screen|media_uploaded|message_ack|message_create|message_reaction|message_revoke_everyone|qr|contact_changed|unread_count|message_edit|message_ciphertext RECOVER_SESSIONS=TRUE

Then I start to receive messages from whatsapp in my endpoint, and send messages using client/sendMessage. After some time whatsapp stops working and I get an session_not_connected error

Until whatsapp-web.js v1.33 this also happened, but I needed to re-bind the device on average once a day. Now I need to do it once every 1.5-2 hours. What could be wrong with my session? Is anyone else experiencing this problem?

andrew-belyi avatar Sep 06 '25 09:09 andrew-belyi