whatsapp-web.js
whatsapp-web.js copied to clipboard
(WIP / Proof of concept) WhatsApp Web version selection
Description
A proof of concept to enable loading a specific whatsapp web version. This would also mean we can target a specific whatsapp web version with a specific library version, solving our issues with having to always play catch up with WhatsApp whenever they make breaking changes.
This works by retrieving the index.html from a remote cache (which references a specific entrypoint). WhatsApp keeps old cached JS files in their CDN for a long time, so replacing the index works even after they've released new versions.
When the session opened in the latest version and I switch to an older version (e.g. 2.2245.9 to 2.2244.6) a database error occurs and it goes to the QR screen, sometimes when I clear the cache before downgrading it seems to work
When the session opened in the latest version and I switch to an older version (e.g. 2.2245.9 to 2.2244.6) a database error occurs and it goes to the QR screen, sometimes when I clear the cache before downgrading it seems to work
Yep, I've seen that as well. Some updates make changes to the database that can't be reversed, so downgrading will most likely not be explicitly supported. This would mostly be useful for deciding when to update and making sure that everything is functional and compatible with the new version before everyone updating.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@pedroslopez do you need any help here?
Using this implementation: https://github.com/wppconnect-team/wppconnect/blob/33135c09251f2789911321652aec130be306b7d9/src/controllers/browser.ts#L65 https://github.com/wppconnect-team/wa-version/blob/966c554b705d01e8b6b7ec7de834721088a74cb7/src/getPageContent.ts#LL29 ... https://github.com/matricce/whatsapp-web.js/commit/2b6afeded4e25d2d86347e0f5829bacfa7ddf158
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@matricce thanks for letting me know about wa-version! Added support for it - check out the PR description for how to hook it up 😄