ookamiiixd / baileys-api

Simple WhatsApp REST API with multiple device support
MIT License
431 stars 327 forks source link

Session destroy after one week #148

Closed dewanggaeka closed 1 year ago

dewanggaeka commented 1 year ago

since running system after one week, session always destroy even though I only added 1 session and even try to send message, response message: "session not found" it's happened twice

does it have to renew session every 1 week?

(sorry my english is bad)

ookamiiixd commented 1 year ago

I'm not sure about this. Is it always exactly 1 week? If so, i suppose it's something related with WhatsApp or Baileys itself. Since i've never used a session for that long, i couldn't do anything about this

dewanggaeka commented 1 year ago

the last session lasted only 3 days. I use it regularly, at least 3-4 times a day. it's okay if it's from Baileys, I just have to check it regularly.

ookamiiixd commented 1 year ago

Is there something emitted in the log? if you could provide it with lower logger level (debug), i might be able to understand something

dewanggaeka commented 1 year ago

sorry I don't keep logs, but when the session is destroyed there is a description in the terminal. when updating my session it will screenshot my terminal

beyondgoogling commented 1 year ago

Did you use WhatsApp on Mobile within that One week? Cos sometimes if you don't use WhatsApp on mobile for a while, it disconnects the web instance of the WhatsApp account.

dewanggaeka commented 1 year ago

Did you use WhatsApp on Mobile within that One week? Cos sometimes if you don't use WhatsApp on mobile for a while, it disconnects the web instance of the WhatsApp account.

sometimes i turn off internet connection on mobile whatsapp, or sometimes i run out of battery. so it also has an effect on disconnecting the web connection from the WhatsApp account?

dev-stupid-codes commented 1 year ago

https://github.com/adiwajshing/Baileys/issues/1292

dewanggaeka commented 1 year ago

must always be connected to the internet on whatsapp mobile, it's been a few weeks without problems with session crashes since i always keep whatsapp mobile always connected to the internet