Rhymen / go-whatsapp

WhatsApp Web API
MIT License
2.07k stars 493 forks source link

Failed to login #626

Closed yogawa closed 2 years ago

yogawa commented 2 years ago
2021/11/02 11:07:55 error occoured: server closed connection,code: 1000,text:
2021/11/02 11:07:56 error logging in: restoring failed: error decoding login connResp: json: cannot unmarshal array into Go value of type map[string]interface {}

Response from server

["Cmd",{"type":"update"}]
xhit commented 2 years ago

Set the client version like this:

WAC, err = whatsapp.NewConnWithOptions(&whatsapp.Options{
        Timeout:         1 * time.Minute, 
    })

WAC.SetClientVersion(2, 2142, 12)
mqnoy commented 2 years ago

thx alot @xhit

yogawa commented 2 years ago

@xhit thanks, it works