Tithibots / tithiwa

Automate Web WhatsApp with selenium in python.
MIT License
24 stars 22 forks source link

Fix Web WhatsApp session is not working with new Multi-device beta #87

Open NavpreetDevpuri opened 2 years ago

NavpreetDevpuri commented 2 years ago

To reproduce join Multi-device beta and try to save session and restore session it is failing to restore session

from tithiwa import *

tithiwabot = Tithiwa()
tithiwabot.generate_session("01")

tithiwabot1 = Tithiwa()
tithiwabot1.open_session("01")
alphabetagamer commented 2 years ago

On diff checking between two session strings I found most key-value pairs were the same except a few like "debugCursor", could they be using values from those keys to verify if the session was newly initiated?

NavpreetDevpuri commented 2 years ago

good findings, we can investigate it by experimenting about how web WhatsApp is storing sessions by trying to remove local storage or/and indexDB. Then we might figure out that both local storage and indexDB matter for sessions so, we have to get both local storage and indexDB from the browser in order to extract sessions.