Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

groupsv2 panic when add client to group or group message recivied #72

Open
argon338 opened this issue Nov 11, 2022 · 2 comments
Open

groupsv2 panic when add client to group or group message recivied #72

argon338 opened this issue Nov 11, 2022 · 2 comments

Comments

@argon338
Copy link

New message:

DEBU[2022/11/11 10:25:48] [textsecure] handleMessage
DEBU[2022/11/11 10:25:48] [textsecure] Websocket sending message
DEBU[2022/11/11 10:25:50] [textsecure] handleMessage
DEBU[2022/11/11 10:25:50] [textsecure] handleDataMessage 1668151550786 1668151550377 0
DEBU[2022/11/11 10:25:50] [textsecure][groupsv2] handle groupv2 group not found open .storage/groupsv2/259288278ceee8311f2e47c3c527f972fa1e30b7dddf279ca2b1ab2326ee2d00: no such file or directory .storage/groupsv2/259288278ceee8311f2e47c3c527f972fa1e30b7dddf279ca2b1ab2326ee2d00
DEBU[2022/11/11 10:25:50] [textsecure][groupv2] save group .storage/groupsv2/259288278ceee8311f2e47c3c527f972fa1e30b7dddf279ca2b1ab2326ee2d00
DEBU[2022/11/11 10:25:50] [textsecure][groupsv2] update group from server
DEBU[2022/11/11 10:25:50] [textsecure][groupsv2] queryGroupChangeFromServer
DEBU[2022/11/11 10:25:50] [textsecure][groupsv2] get groupCredentials
DEBU[2022/11/11 10:25:51] [textsecure] GET /v1/certificate/group/19307/19314 200
DEBU[2022/11/11 10:25:51] [textsecure] GET with auth /v1/groups/ 401
ERRO[2022/11/11 10:25:51] [textsecure][groupsv2] error updating group change from serverstatus code 401
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x8255e8]

goroutine 1 [running]:
github.com/signal-golang/textsecure/groupsv2.HandleGroupsV2({0xc000180460?, 0x5?}, 0xc0000cce10?)
/home/agronovsa/go/src/signal-alerts/vendor/github.com/signal-golang/textsecure/groupsv2/groupsv2.go:313 +0x3e8
github.com/signal-golang/textsecure.handleDataMessage({0xc00011a810, 0x24}, {0xc00011a810, 0x24}, 0x1?, 0xc000536240)
/home/agronovsa/go/src/signal-alerts/vendor/github.com/signal-golang/textsecure/handler.go:86 +0x1a9
github.com/signal-golang/textsecure.handleMessage({0xc00011a810, 0x24}, {0xc00011a810, 0x24}, 0xc0000a8c60?, {0xc00052ac70, 0x5b, 0xa0})
/home/agronovsa/go/src/signal-alerts/vendor/github.com/signal-golang/textsecure/handler.go:21 +0x425
github.com/signal-golang/textsecure.handleReceivedMessage(0xc000148700)
/home/agronovsa/go/src/signal-alerts/vendor/github.com/signal-golang/textsecure/textsecure.go:636 +0xcad
github.com/signal-golang/textsecure.StartListening()
/home/agronovsa/go/src/signal-alerts/vendor/github.com/signal-golang/textsecure/websocket.go:199 +0x5df
main.main()
/home/agronovsa/go/src/signal-alerts/cmd/main.go:476 +0x8ea
exit status 2

@argon338
Copy link
Author

problem going from here

resp, err := transport.StorageTransport.GetWithAuth(GROUPSV2_GROUP, "Basic "+basicAuth(auth.Username, auth.Password))

there is no 401 exception

if resp.IsError() {

and that returns nil for group.DecryptedGroup that cause panic here

} else if group.DecryptedGroup.Revision != groupContext.GetRevision() {

The main problem bad auth during process.

@argon338
Copy link
Author

@nanu-c have you any ideas why it returns 401?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant