Open Brblol opened 4 years ago
i have the same problem the issue is whatsapp they have to modify their code to solve the issue
[1] Message after login: 1585527026,["Cmd",{"type":"update"}] [1] Traceback (most recent call last): [1] File "/app/backend/whatsapp.py", line 149, in onMessage [1] self.loginInfo["serverRef"] = json.loads(messageContent)["ref"]; [1] TypeError: list indices must be integers, not str [1] [1] send: '\x88\x82\xb6\xb9a\xe5\xb5Q' [1] sending {"type": "resource_gone", "resource": "whatsapp", "resource_instance_id": "10a70c37576a412999bd9c5ca2325467", "from": "backend"} [1] WhatsApp backend Websocket closed. [0] got message { [0] type: 'resource_gone', [0] resource: 'whatsapp', [0] resource_instance_id: '10a70c37576a412999bd9c5ca2325467', [0] from: 'backend' [0] }
i have some issue. How to fix it?
I found out that this problem might require proxy.
def connect(self): self.activeWs = websocket.WebSocketApp("wss://web.whatsapp.com/ws", on_message = lambda ws, message: self.onMessage(ws, message), on_error = lambda ws, error: self.onError(ws, error), on_open = lambda ws: self.onOpen(ws), on_close = lambda ws: self.onClose(ws), header = { "Origin: https://web.whatsapp.com" });
self.activeWs.run_forever(http_proxy_host="127.0.0.1", http_proxy_port=1087);
self.websocketThread = Thread(target = self.activeWs.run_forever);
self.websocketThread.daemon = True;
self.websocketThread.start();
Hi
I ran
npm install -f
andpip install -r requirements.txt
thennpm start
. Then I went to localhost:2018 and clicked the button a few times, when it gets to generating the QR code it saysAny ideas whats gone wrong?