'cmd': {version: '2.2126.11', type: 'upgrade_md_prod'}
(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']
Source: sigalor/whatsapp-web-reveng