status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

Empty account is randomly created

Open VolodLytvynenko opened this issue 1 year ago • 27 comments

Unfortunately, this issue doesn't happen consistently, and there are no exact steps to reproduce it. Hopefully, the logs will help

Steps:

Create new account

Actual result:

The display name is not shown for such account; The wallet is not created; Additional wallet account can't be created; Assets are not shown

https://github.com/user-attachments/assets/d882b793-511e-445c-a1c9-1b649bef69a2

Additional info:

In some cases, an error is shown after key generation when such empty account is going to be created, as @pavloburykh encountered once. However, I didn’t face this error in my case.

Device:

Pixel 7a, Android 13

Logs:

logcat.txt Status-debug-logs.zip

ENV:

nightly 30 Aug 2024

VolodLytvynenko avatar Aug 30 '24 11:08 VolodLytvynenko

Reproduced in e2e builds several times per day.

churik avatar Sep 05 '24 14:09 churik

ERROR[08-30|10:56:02.169|github.com/status-im/status-go/mobile/status.go:343]                                                                      failed to create account                 error="account not found"

qfrank avatar Sep 06 '24 01:09 qfrank

Does this problem often occur when a new account is created immediately after logging out?

qfrank avatar Sep 06 '24 01:09 qfrank

If yes, I guess it's because we didn't take care of race operation on accountsGenerator in the backend as Logout/CreateAccountAndLogin are aync invoked

qfrank avatar Sep 06 '24 01:09 qfrank

@qfrank I couldn't really reproduce it with when a new account is created immediately after logging out?

In e2e tests, like mentioned in the issue, but we continue to encounter to this issue just on simple account creation on Enable notification screen image

TestOneToOneChatMultipleSharedDevicesNewUi_geth1.log

churik avatar Sep 10 '24 15:09 churik

moreover, users are also facing this error after upgrade:

1. Issue Description
Please shake the phone to report this error and restart the app. multiaccount is currently empty, which means something went wrong when trying to update it with


2. Steps to reproduce
<no value>


3. Attach screenshots that can demo the problem, please

churik avatar Sep 10 '24 16:09 churik

emm.. let me draft a PR and see if it make any difference

qfrank avatar Sep 11 '24 11:09 qfrank

could you try this PR to see if it make any difference? thank you! @churik

qfrank avatar Sep 11 '24 11:09 qfrank

hm, it is hard to catch it, but let me try 5-6 times in the loop

churik avatar Sep 11 '24 11:09 churik

no, it doesn't :( same place, same error TestOneToOneChatMultipleSharedDevicesNewUiTwo_geth0.log

churik avatar Sep 11 '24 13:09 churik

no, it doesn't :( same place, same error TestOneToOneChatMultipleSharedDevicesNewUiTwo_geth0.log

can't see the error(account not found) in the log, so it's not relate to this issue 🤔

qfrank avatar Sep 12 '24 05:09 qfrank

the log message "started a node, and created account" shows account created successfully. What if restart app?

qfrank avatar Sep 12 '24 06:09 qfrank

I'm running out of idea ATM, unassign myself, maybe back one day when inspiration comes.

qfrank avatar Sep 12 '24 06:09 qfrank

One more example of appearing this error pop up: image

In this case the second user is created on the device.

Logs: requests.log geth.log

yevh-berdnyk avatar Sep 19 '24 10:09 yevh-berdnyk

@yevh-berdnyk let's try to find out if in this case account is created and usable, because if it is, we should move it to different issue

churik avatar Sep 19 '24 10:09 churik

@churik yes, we have a lot of examples in e2e test runs when account is created and usable after closing this pop up. And we already have a separate issue https://github.com/status-im/status-mobile/issues/20806, I'll add logs there

yevh-berdnyk avatar Sep 19 '24 12:09 yevh-berdnyk

@churik, is it Android-only issue?

vkjr avatar Sep 23 '24 11:09 vkjr

@vkjr I've seen it on IOS also, but only once. Important note: this issue and https://github.com/status-im/status-mobile/issues/20806 are different - in case of this the empty account is created, in case of https://github.com/status-im/status-mobile/issues/20806 (it might be only Android, hard to say) - account might be created and usually created but in the middle of the process there is a popup "Please, shake your phone".

churik avatar Sep 23 '24 15:09 churik

@churik, thank you, will try to test more on Android, because on iOS I've created 15 accounts and never experienced this

Btw, if "Please shake your phone" related to other issue, can it be removed from the issue description?

vkjr avatar Sep 24 '24 11:09 vkjr

@pavloburykh, I created tons of accounts on iOS, Android and simulator but wasn't able to reproduce the issue. Don't know is it good or bad :) I'd suggest to lower the priority of this issue until we encounter it again or get complains from the users. Because it looks like very rare and not too harmful because user can't lose any assets and can create account again if problem encountered. Wdyt?

vkjr avatar Sep 25 '24 13:09 vkjr

we got a couple of complains, that say exactly - empty multiaccount is created. I'll move it from the milestone then, as we really don't have a solution now.

Thanks for investigation @vkjr

churik avatar Sep 26 '24 14:09 churik

image Just confirming that we contine to receive these reports from users; cc @ilmotta @vkjr

churik avatar Sep 30 '24 11:09 churik

Got it, I'm gonna put it in 2.32 milestone. Seems to be a recurring bug.

shivekkhurana avatar Oct 01 '24 18:10 shivekkhurana

@ilmotta @churik I have faced the issue on my physical IOS in today's nightly (Oct 9, 2024) while recovering existing account. Attaching logs, though not sure they will be helpful as debug level was disabled

status_logs (8).zip

Image

https://github.com/user-attachments/assets/16e45863-6b16-4f17-a7d0-ad5a674b05e9

pavloburykh avatar Oct 09 '24 15:10 pavloburykh

@pavloburykh @churik, quick question, once you face this bug, what happens if you delete the profile and try to recover again, will it work this time around?

ilmotta avatar Oct 15 '24 04:10 ilmotta

it is pretty random, I didn't face it myself, but I suppose it will. It even might work in case user skip this error, but not always. Pretty sure that @pavloburykh might try that.

churik avatar Oct 15 '24 09:10 churik

Should be closed along with https://github.com/status-im/status-mobile/issues/20806

churik avatar Oct 17 '24 12:10 churik

Closing this issue now that #20806 has been closed

seanstrom avatar Oct 30 '24 23:10 seanstrom