-
Notifications
You must be signed in to change notification settings - Fork 30
ID without username causes exception #61
Comments
Yap also occurs on previous version and this is really important to fix, because user that are login using the recovery do not have their username in the first place |
@talhasch This type of error usually happens when the user is not signed in correctly, or the user is not available in radiks models, try to use User.createWithCurrentUser(); before the user start his session or logging in. Hank did an illustration of how to do this here: made the fix in the stackit sample which others can see here stacks-archive/stackit#8 |
@moxiegirl see https://github.com/blockstack/radiks/blob/master/src/models/group-membership.ts#L52 if the account doesn't have a username radiks creates _id field with an uuid and right after queries with the account's username (null) Since no match on server side that error occurs. radiks highly rely on username but not all accounts have username. i think identityAddress is more appropriate for _id field. It is unique and all accounts have it. we have 1463 users on runkod so far but 303 of them (almost 1/4) couldn't login due to that problem. Even a TMUI tester couldn't login and runkod got very weak score. |
@talhasch Thanks for clarifying the issue. @jeffdomke I'm going to drop this back into the queue. The code does not handle the usecase where an id has no username. Need to decide if this is a feature request a bug. May also be something we need to simply have a better error for. |
User.createWithCurrentUser()
causesgroup-membership.js:190 Uncaught (in promise) TypeError: Cannot read property 'attrs' of undefined
with non-username accounts.Tested versions: 0.2.1, 0.3.0-beta.1
The text was updated successfully, but these errors were encountered: