whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

(WIP / Proof of concept) WhatsApp Web version selection

Open pedroslopez opened this issue 2 years ago • 6 comments

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.

pedroslopez avatar Nov 26 '22 22:11 pedroslopez

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

matricce avatar Dec 08 '22 12:12 matricce

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.

pedroslopez avatar Dec 08 '22 14:12 pedroslopez

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.

stale[bot] avatar Jan 07 '23 22:01 stale[bot]

@pedroslopez do you need any help here?

tryvin avatar Feb 19 '23 12:02 tryvin

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

matricce avatar Apr 01 '23 13:04 matricce

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.

stale[bot] avatar May 21 '23 21:05 stale[bot]

@matricce thanks for letting me know about wa-version! Added support for it - check out the PR description for how to hook it up 😄

pedroslopez avatar May 29 '23 05:05 pedroslopez