Open mark-prins opened 1 month ago
I can confirm that doing this
delete from user_store_join where user_id = '21F40ED44E444C1291DA7133AF906431';
delete from user_permission where user_id = '21F40ED44E444C1291DA7133AF906431';
delete from user_account where id = '21F40ED44E444C1291DA7133AF906431';
in the above database resolves the problem
At some point i wanted every error to be structured error and very concrete (named to explain exactly what it is), at some point Clemens mentioned it's too much work mapping it all, and at this stage I thought it was reasonable to agree that some errors are ok as standards errors with less description as they are not likely to happen and if they do there is something is badly wrong.
There is an error! being logged btw.
Yes agree if it happened in the wild, the message doesn't help the user think of next action.
Maybe all InternalError should have something like contact support ?
Btw i can replicate this consistently, if you re-initialise. Then quit mSupply central server so it's not accessible anymore.
Then try to login (users sync now but without passwords).
I think as part of solving this issue we should also not search for users with empty passwords when checking passwords against user
Good investigating - thanks Andrei! Would be good to investigate the bug scenario and prevent the empty-password users from being created and/or being returned in the login query
Maybe all InternalError should have something like contact support ?
yeah, good idea. at least that login one - it's a bit of a blocker
I can't seem to reproduce at all? The user login upserts users on id and translator also upserts on id... I'm wondering how the id changed? π
Steps I did:
I had this yesterday - was restoring a database and testing locally.. but didn't track the steps! was in a rush sorry, so don't know exactly what I did to recreate.
Ties in with #2654 and all the other login error issues linked in 2654 π
What went wrong? π²
I've had this one a few times when trying to login:
Looking at the explanatory comment in the code:
does not explain the problem.
Expected behaviour π€
I would prefer a message which told me something in English. A couple of thoughts:
The user account has invalid credentials stored in the database. Please try logging in as another user, or contact support.
This should show instead ofThe server experienced a problem
and not require the tooltipHow to Reproduce π¨
Looking at my database, I have this:
and from memory, having a duplicate user record has been a problem before.
These are the steps I took:
Your environment π±