Rhymen / go-whatsapp

WhatsApp Web API
MIT License
2.04k stars 491 forks source link

Panic when multi-device enabled #617

Closed AlmogBaku closed 2 years ago

AlmogBaku commented 2 years ago

When I "login" a new device (with multi-device enabled), the client panic:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 22 [running]:
github.com/Rhymen/go-whatsapp.newInfoFromReq(0xc000318660, 0x38)
/tmp/codon/tmp/cache/go-path/pkg/mod/github.com/!rhymen/go-whatsapp@v0.1.2-0.20210714125832-447ed9cc6179/session.go:63 +0xc67
github.com/Rhymen/go-whatsapp.(*Conn).Login(0xc0000fe800, 0xc000042420, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/tmp/codon/tmp/cache/go-path/pkg/mod/github.com/!rhymen/go-whatsapp@v0.1.2-0.20210714125832-447ed9cc6179/session.go:268 +0xefb
lkd-wa/manager.(*gowa).Register.func1(0xc000092280, 0xc00003dcc0, 0xd, 0xc00010e240, 0xc0000fe800, 0xc000042420)
/tmp/build_e97b026f/manager/gowa.go:372 +0xd9
created by lkd-wa/manager.(*gowa).Register
/tmp/build_e97b026f/manager/gowa.go:369 +0x40a

Probably, the handshake protocol has changed. Link to the panicking line

AlmogBaku commented 2 years ago

Duplicate #601