Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't login to account sql: no rows in result set #10002

Closed
Serhy opened this issue Feb 7, 2020 · 9 comments · Fixed by #10008
Closed

Can't login to account sql: no rows in result set #10002

Serhy opened this issue Feb 7, 2020 · 9 comments · Fixed by #10008

Comments

@Serhy
Copy link
Contributor

Serhy commented Feb 7, 2020

Bug Report

Problem

No clear reproduction so far but I keep here some notes for now:

I've got this state while testing RC11. And at the same time on both iOS and Android, can't reproduce now on Android (kept logcat and kept the build with such 'sick' account on iOS)
Last actions before issue occured:

  • I had ~4 accounts already existing in apps (both Android and iOS)
  1. Android created new account (UserA). Back up seed phrase (it was this one cloud mesh pyramid kidney rubber winner lounge system reject weird picnic ride). Android switch to Ropsten and received ETHro and XLS from different account
  2. iOS creates one more new account (UserB). Back up seed phrase (it was system remain polar salad couch dwarf churn tourist depend answer intact minute). iOS switched to Ropsten and received XLS from different account
  3. iOS recovers UserA
  4. Android recovers UserB
  5. iOS recovers UserB and Android recovers UserA (their first accounts they back up)

Now when I login to account which was recovered in 3rd and 4th steps on respective device, - I get sql: no rows in result set error.
If I try to login to any other account - I get the same error, until I restart the app. In that case I can login to "healthy" accounts.

Expected behavior

Can login to account

Actual behavior

Can't login to account sql: no rows in result set

Screenshot 2020-02-07 at 22 26 54

Notes

Additional Information

  • Status version: RC11
  • Operating System: Android and iOS

Logs

logcatNoRowsInResultSet.log

of device when I try to login to sick account

02-07 20:14:17.518 27678 27718 D StatusModule: clearCookies
02-07 20:14:17.519 27678 27718 D StatusModule: clearStorageAPIs
02-07 20:14:17.520 27678 27718 D StatusModule: login
02-07 20:14:17.521 27678 27729 D StatusModule: Signal event: {"type":"node.login","event":{"error":"sql: no rows in result set"}}
02-07 20:14:17.522 27678 27718 D StatusModule: Login result: {"error":""}

@Serhy Serhy added the bug label Feb 7, 2020
@Serhy
Copy link
Contributor Author

Serhy commented Feb 7, 2020

I'd blame the recovering same account twice, but that's not the case

@rachelhamlin
Copy link
Contributor

Does restarting the app also allow you to log in to the accounts in question @Serhy?

@rasom rasom self-assigned this Feb 10, 2020
@Serhy
Copy link
Contributor Author

Serhy commented Feb 10, 2020

No. For the particular account I created (or re-recovered) I can't login even after restart. But all the rest multiaccounts are fine.
It seem may be connected to recover, because before I could re-login when receiving funds, and if so - user won't loose funds (because recovery phrase stored).

I'm trying to reproduce it now

@rasom
Copy link
Contributor

rasom commented Feb 10, 2020

I can't reproduce the issue

@Serhy
Copy link
Contributor Author

Serhy commented Feb 10, 2020

I can't reproduce it as well now, tried steps from description, various re-logins/changing network and recovering already existed account, - no 'no rows in result set' error (error apparently says that account failed to be stored in db, maybe that happened when I recovered account and node was not running or something like that)

@Serhy
Copy link
Contributor Author

Serhy commented Feb 10, 2020

Finally, I reproduced it.
That's indeed connected to recover of the same account.

@Serhy
Copy link
Contributor Author

Serhy commented Feb 10, 2020

Really edge case.
When we recover same account (which is different issue I'll create) node fails to start. But I still can log out of that account. If I log out and create or recover another accounts in the same app session - they, if I'm correct, fail to be stored in DB and thus no way to log in later.
Root cause here is to recover the same account already existing, then log out (not via app restart) - and then create or recover different account.

Reproduction:

  1. Open fresh Status build and recover cloud mesh pyramid kidney rubber winner lounge system reject weird picnic ride
  2. Restart app (or log out)
  3. Recover the same account ( cloud mesh pyramid kidney rubber winner lounge system reject weird picnic ride)
  4. Once you on Chats home view -> Profile -> Log out
  5. Create or recover different account (system remain polar salad couch dwarf churn tourist depend answer intact minute)
  6. Restart the app and try to login to account created in 5th step
    Actual result: Can't login to account sql: no rows in result set

@rasom
Copy link
Contributor

rasom commented Feb 10, 2020

@Serhy would be great if we write aoutotest for recovering existing acc

@Serhy
Copy link
Contributor Author

Serhy commented Feb 10, 2020

Autotest has been created. Will merge along with other fixes in separate PR

rasom added a commit that referenced this issue Feb 13, 2020
- ensure that `:key-uid` is always added to `app-db` with proper case
- tests which cover multiacc duplication case
rasom added a commit that referenced this issue Feb 13, 2020
- ensure that `:key-uid` is always added to `app-db` with proper case
- tests which cover multiacc duplication case
rasom added a commit that referenced this issue Feb 24, 2020
- ensure that `:key-uid` is always added to `app-db` with proper case
- tests which cover multiacc duplication case
rasom added a commit that referenced this issue Feb 25, 2020
- ensure that `:key-uid` is always added to `app-db` with proper case
- tests which cover multiacc duplication case
rasom added a commit that referenced this issue Feb 25, 2020
- ensure that `:key-uid` is always added to `app-db` with proper case
- tests which cover multiacc duplication case
@StatusWrike StatusWrike changed the title Can't login to account sql: no rows in result set Can't login to account sql: no rows in result set Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants