Concordium / concordium-reference-wallet-ios

Reference wallet for the Concordium blockchain
Apache License 2.0
11 stars 10 forks source link

Application crash on "failed ID -> Try again" #292

Closed mh-concordium closed 1 year ago

mh-concordium commented 2 years ago

Bug Description If the ID creation failed, user gets dialogue with three options: "Try again", "Contact support", "Cancel". If user selects "Try again" application crashes.

Steps to Reproduce In attempt to create new ID, make creation with Notabene failed. Wile waiting for ID to be valid (pending validation), just wait while observing Accounts page. After the dialogue appears select "Try again".

Expected Result Create ID flow should be reinitiated.

Actual Result Application crashes.

https://user-images.githubusercontent.com/98821384/175103379-c0332998-627a-4303-9cbe-d342dfe1f6d4.mp4

Versions

Niljak commented 2 years ago

I've managed to find the cause for this issue, and several other similar issues that boil down to the same problem: Once an identity is deemed invalid we remove related accounts from out database. Our database objects are what are called "live objects" so they auto update when the database changes, but if you try to access them after they are removed the app crashes. The crash you are seeing is a result of this. There are ways to mitigate this by verifying that objects have not been removed before access, but doing this in every case is a very big task. I would worry that implementing it would break more things than it fixes, so it might be worth pushing this issue until after 3.0.0.

concordium-cl commented 2 years ago

I 'd say we have to wait then. I'll move the issue to the backlog. Do you agree, @jens-concordium?

jens-concordium commented 2 years ago

Yep, agreed. Let's wait.

concordium-cl commented 1 year ago

Other related issues in jira.