status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 987 forks source link

The app is crashed for user which received shared closed community from the non-owner user of the current community #15347

Closed VolodLytvynenko closed 1 year ago

VolodLytvynenko commented 1 year ago

Preconditions:

Steps to reproduce:

1.User_a: share community to User_b 2.User_b: send a request to join the community 3.User_a: accept the request (now User_b is member of community) 4.User_b: share community to User_c 5.User_c: open the message and wait at least 5-6 seconds

Actual result:

The app is crashed for User_c

Logs:

Status.log geth.log

ENV:

Nightly: 14 Mar 2023

Parveshdhull commented 1 year ago

Hi @VladimrLitvinenko, I am not able to reproduce this. Please can you give it a one more try.

Also from status.log file relevant error

03-14 20:42:32.025 29386 29537 W ReactNativeJS: WARN [status-im2.common.json-rpc.events:31] - :json-rpc/error stickers_market :error {:code -32000, :message "fallback failed with 'Post \"https://goerli-archival.gateway.pokt.network/v1/lb/1fec70c0d1247dc818107ac7\": context deadline exceeded'. run error was 'Post \"https://goerli-archival.gateway.pokt.network/v1/lb/1fec70c0d1247dc818107ac7\": context deadline exceeded'"} :params [5]

@cammellos Is this something known?

cammellos commented 1 year ago

@VladimrLitvinenko could you provide the logcat logs but not filtered by status? it's possible to do by connecting the android device to the computer and adb logcat > /tmp/logs.txt Thanks!

cammellos commented 1 year ago

Hi @VladimrLitvinenko, I am not able to reproduce this. Please can you give it a one more try.

Also from status.log file relevant error

03-14 20:42:32.025 29386 29537 W ReactNativeJS: WARN [status-im2.common.json-rpc.events:31] - :json-rpc/error stickers_market :error {:code -32000, :message "fallback failed with 'Post \"https://goerli-archival.gateway.pokt.network/v1/lb/1fec70c0d1247dc818107ac7\": context deadline exceeded'. run error was 'Post \"https://goerli-archival.gateway.pokt.network/v1/lb/1fec70c0d1247dc818107ac7\": context deadline exceeded'"} :params [5]

@cammellos Is this something known?

We'd have to check, but this should not cause a crash

VolodLytvynenko commented 1 year ago

Hi @cammellos @Parveshdhull fetched data from logcat. Also recorded the whole flow. The recording is done on android studio emulators for better steps understanding because it was easier to record 3 devices at one time. but it works for real devices as well.

https://user-images.githubusercontent.com/52490791/225365044-db1a1151-b7b0-4d8f-8c2c-76d8396d385e.mp4

Logs:

Untitled document.txt

cammellos commented 1 year ago

@VladimrLitvinenko great work!

This is the error:

17:39:14.875  D  Signal event
17:39:15.078  E  panic: runtime error: invalid memory address or nil pointer dereference
17:39:15.078  E  [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x74566a2bec]
17:39:15.078  E  
17:39:15.078  E  goroutine 1101 [running]:
17:39:15.078  E  github.com/status-im/status-go/protocol/communities.(*Manager).HandleCommunityDescriptionMessage(0x40027f8500, 0x0, 0x4005193a40, {0x400001d500, 0x1aa, 0x1c0})
17:39:15.078  E          github.com/status-im/status-go/protocol/communities/manager.go:909 +0x3c
17:39:15.078  E  github.com/status-im/status-go/protocol/communities.(*Manager).HandleWrappedCommunityDescriptionMessage(0x40027f8500, {0x400001d500, 0x1aa, 0x1c0})
17:39:15.078  E          github.com/status-im/status-go/protocol/communities/manager.go:1268 +0x110
17:39:15.078  E  github.com/status-im/status-go/protocol.(*Messenger).handleWrappedCommunityDescriptionMessage(...)
17:39:15.078  E          github.com/status-im/status-go/protocol/messenger_handler.go:1436
17:39:15.078  E  github.com/status-im/status-go/protocol.(*Messenger).HandleChatMessage(0x400077e280, 0x40052b5268)
17:39:15.078  E          github.com/status-im/status-go/protocol/messenger_handler.go:1904 +0x1510
17:39:15.078  E  github.com/status-im/status-go/protocol.(*Messenger).handleRetrievedMessages(0x400077e280, 0x40052880c0?, 0x1)
17:39:15.078  E          github.com/status-im/status-go/protocol/messenger.go:3357 +0x8b14
17:39:15.078  E  github.com/status-im/status-go/protocol.(*Messenger).RetrieveAll(0x400077e280)
17:39:15.078  E          github.com/status-im/status-go/protocol/messenger.go:2860 +0x50
17:39:15.078  E  github.com/status-im/status-go/services/ext.(*Service).retrieveMessagesLoop(0x400255bc00, 0x745538ca34?, 0x4000675680)
17:39:15.078  E          github.com/status-im/status-go/services/ext/service.go:208 +0xb4
17:39:15.078  E  created by github.com/status-im/status-go/services/ext.(*Service).StartMessenger
17:39:15.078  E          github.com/status-im/status-go/services/ext/service.go:177 +0xdc
cammellos commented 1 year ago

Seems like Signer is nil for some reason

VolodLytvynenko commented 1 year ago

Hi, @cammellos checked this issue in the https://github.com/status-im/status-mobile/pull/15519. It is not reproducible anymore. Thank you for the fix! I think it can be closed