whatsapp icon indicating copy to clipboard operation
whatsapp copied to clipboard

Fatal error when logout command sent right after login

Open clmnin opened this issue 3 years ago • 0 comments

If I send a logout command after a few seconds since sending login the app service crashes

How to recreate

Send the following commands to the whatsappbot in the management room

**me**: login
**Whatsapp bridgebot**: <QR Code>
**Whatsapp bridgebot**: Successfully logged in as <phone number>
**me**: logout
**Whatsapp bridgebot**: Logged out successfully.

Stack Trace

runtime.fatalpanic (panic.go:1271) runtime
runtime.gopanic (panic.go:1147) runtime
runtime.panicmem (panic.go:221) runtime
runtime.sigpanic (signal_unix.go:735) runtime
whatsmeow.(*Client).generateRequestID (request.go:20) go.mau.fi/whatsmeow
whatsmeow.(*Client).sendIQAsync (request.go:90) go.mau.fi/whatsmeow
whatsmeow.(*Client).sendIQ (request.go:114) go.mau.fi/whatsmeow
whatsmeow.(*Client).GetProfilePictureInfo (user.go:197) go.mau.fi/whatsmeow
main.(*Puppet).UpdateAvatar (puppet.go:203) main
main.(*Puppet).Sync (puppet.go:328) main
main.(*User).ResyncContacts (user.go:789) main
main.(*User).HandleEvent.func2 (user.go:494) main
runtime.goexit (asm_amd64.s:1581) runtime
 - Async Stack Trace
main.(*User).HandleEvent (user.go:493) main

Logs

[Matrix/Bot/DEBUG] req #222: PUT http://domain/_matrix/client/r0/rooms/%21ZIWwylCHpYUXOUTlRn:domain/send/m.room.message/mautrix-go_1643879585752077756_4?user_id=%40whatsappbot%3Adomain {"msgtype":"m.notice","body":"Logged out successfully."}
[Matrix/DEBUG] Starting handling of transaction 228 (1 PDUs)
[Matrix/@whatsapp_phone:domain/DEBUG] req #223: PUT http://domain/_matrix/client/r0/profile/@whatsapp_phone:domain/avatar_url?user_id=%40whatsapp_phone%3Adomain {"avatar_url":"mxc://domain/ISJXoRAZpFmSEOWFFcMAHiZk"}
[Puppet/[email protected]/DEBUG] Updated avatar  -> 1643429951
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb13348]

clmnin avatar Feb 03 '22 09:02 clmnin