Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'cmd': {version: '2.2126.11', type: 'upgrade_md_prod'} #372

Open
ashreact opened this issue Sep 4, 2022 · 1 comment
Open

'cmd': {version: '2.2126.11', type: 'upgrade_md_prod'} #372

ashreact opened this issue Sep 4, 2022 · 1 comment

Comments

@ashreact
Copy link

ashreact commented Sep 4, 2022

(A.) After QRcode Scan, I got this message from the server:

sending {"from": "backend", "timestamp": 1662277391920, "resource_instance_id": "d2f1959831024e54a9394877ea831ebb", "message": ["Cmd", {"version": "2.2126.11", "type": "upgrade_md_prod"}], "type": "whatsapp_message_received", "message_type": "json"}
[1] ["Cmd", {"version": "2.2126.11", "type": "upgrade_md_prod"}]
[1] send: '\x88\x82\xed\x0f\xe5Z\xee\xe7'
got message {
[0] from: 'backend',
[0] timestamp: 1662277391920,
[0] resource_instance_id: 'd2f1959831024e54a9394877ea831ebb',
[0] message: [ 'Cmd', { version: '2.2126.11', type: 'upgrade_md_prod' } ],
[0] type: 'whatsapp_message_received',
[0] message_type: 'json'
[0] }
[0] got message {
[0] type: 'resource_gone',
[0] resource: 'whatsapp',
[0] resource_instance_id: 'd2f1959831024e54a9394877ea831ebb',
[0] from: 'backend'
[0] }

After digging a bit in the WA web code, it seems this message indicates that the client needs to be upgraded to the mulit-device version.
what could be the possible solution to it?

(B) Also whatsapp websocket is using wss://web.whatsapp.com/ws/chat gateway instead of wss://web.whatsapp.com/ws gateway. And When I tried to update the gateway to 'wss://web.whatsapp.com/ws/chat' client doesn't establish connection with ws. But the wss://web.whatsapp.com/ws gateway works to establish connection but can't proceed after QRscan and sending response with message: ["Cmd", {"version": "2.2126.11", "type": "upgrade_md_prod"}]

Am I configuring it wrong?

Note: I'm using WHATSAPP_WEB_VERSION="2,2232,8"
And to avoid hard code for WA web version add this line:

import requests
res = requests.get('https://web.whatsapp.com/desktop/mac/releases').json()
WHATSAPP_APP_VERSION = res['name']

@bcattaneo
Copy link

Apparently this project doesn't work on "multi device", so it won't work with devices that already enabled this feature. You could check https://github.com/pokearaujo/multidevice instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants