status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
296 stars 79 forks source link

Contacts: Verifying contact ID causes verifyee's app to crash #8205

Closed 0x-r4bbit closed 1 year ago

0x-r4bbit commented 1 year ago

Steps to reproduce:

User A and User B

  1. User A sends contact request to user B
  2. User B accepts contact request
  3. User A sends ID verification to user B
  4. User B responds to ID verification
  5. User A's app crashes

@caybro also reported that he couldn't start the app anymore after that.

anastasiyaig commented 1 year ago

I can reproduce as well:

qrc:/imports/shared/status/StatusChatInput.qml:1148:21: QML StatusScrollView: Binding loop detected for property "contentWidth"
DBG 2022-11-14 11:53:44.989+03:00 NewBE_callPrivateRPC                       topics="rpc" tid=5576343 file=core.nim:20 rpc_method=stickers_installed
qrc:/app/AppLayouts/Chat/views/ChatMessagesView.qml:243:9: QML Connections: Cannot assign to non-existent property "onDataChanged"
DBG 2022-11-14 11:53:45.085+03:00 NewBE_callPrivateRPC                       topics="rpc" tid=5576343 file=core.nim:20 rpc_method=wakuext_getLatestVerificationRequestFrom
qrc:/app/AppLayouts/Onboarding/OnboardingLayout.qml:17: TypeError: Cannot read property 'displayBackButton' of null
qrc:/app/AppLayouts/Onboarding/stores/StartupStore.qml:7: TypeError: Cannot read property 'currentStartupState' of null
qrc:/app/AppLayouts/Onboarding/stores/StartupStore.qml:8: TypeError: Cannot read property 'selectedLoginAccount' of null
WRN 2022-11-14 11:53:45.135+03:00 Error decoding signal                      topics="signals-manager" tid=5576343 file=signals_manager.nim:43 err="Unknown signal received: mediaserver.started"
DBG 2022-11-14 11:53:45.146+03:00 NewBE_callPrivateRPC                       topics="rpc" tid=5576343 file=core.nim:20 rpc_method=settings_getSocialLinks
DBG 2022-11-14 11:53:45.147+03:00 NewBE_callPrivateRPC                       topics="rpc" tid=5576343 file=core.nim:20 rpc_method=settings_getSocialLinks
INF 2022-11-14 11:53:45.147+03:00 shutting down...                           topics="status-app" tid=5576343 file=nim_status_client.nim:145
Traceback (most recent call last)
/Users/anastasiya/status-desktop/src/nim_status_client.nim(181) nim_status_client
/Users/anastasiya/status-desktop/src/nim_status_client.nim(155) mainProc
/Users/anastasiya/status-desktop/src/app/boot/app_controller.nim(280) delete
/Users/anastasiya/status-desktop/src/app_service/service/message/service.nim(133) delete
/Users/anastasiya/status-desktop/vendor/nimqml/src/nimqml/private/qobject.nim(64) delete
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
make: *** [run-macos] Error 1
0x-r4bbit commented 1 year ago

Thanks @anastasiyaig for confirming. Can you tell me what version of desktop youp've usedf?

anastasiyaig commented 1 year ago

i'm on master now e8b9760c4ffcad99cf4df7e4e278ef732332ad48 @PascalPrecht

0x-r4bbit commented 1 year ago

Thank you, looking into this now.

MishkaRogachev commented 1 year ago

That type of notifications is not supported, working on it here: https://github.com/status-im/status-desktop/issues/7373

anastasiyaig commented 1 year ago

but it was not leading to a crash @MishkaRogachev before. I defo was able to bypass the verification flow without crashes (yes, without notifications but still)

caybro commented 1 year ago

It still should not crash...

0x-r4bbit commented 1 year ago

@MishkaRogachev thanks for confirming this and pointing us at #7373 . That makes #8222 a dupe.

Re: crash: I'd still investigate this one though. Unless you say you know what it is and have already a fix in the making.

0x-r4bbit commented 1 year ago

So this is getting really unpredictable. Things I've experienced so far:

Context: I have two instances of desktop, with user A and B and they are contacts via contact requests.

Then, User B sent a verification request. User A has not responded yet. Then, closing the app for user B and restarting it, causes the app to crash (due to trying access storage from nil). I tried putting some rough logs to see where this is happening but couldn't find yet where this comes from.

Then, closing and reopening app for user A, the same thing happens it crashes on startup. Reopening it again, it worked.

Not sure if these things are connected because the apps crash without a stack trace.

0x-r4bbit commented 1 year ago

@anastasiyaig can you test the linked PR?

jrainville commented 1 year ago

My bad, I didn't see you wanted Nastya to test. I merged already since it had 2 reviews, passed tests and was just a fix. Hopefully you can test on master