-
Notifications
You must be signed in to change notification settings - Fork 30
Issue with retrieving UserGroups #45
Comments
I'm having this issue as well, +1 |
Hello again Blockstack, any thoughts on this? Haven't been able to find a work-around. |
@hstove any chance you can advise on the best path forward here? Should you or DevX try to solve this? Is this best solved by a community PR? |
@jeffdomke @hstove it's possible that the issue is coming from the This method gets called as part of
|
still facing this problem is jan 24, 2020 |
Been struggling with trying to use I experienced this issue too. And these are my observations. After you log in, If you lose those values, then you will experience the issue above. What I'm saying is that somehow, When that happens... I don't know if you could decrypt your My workaround for this problem is to create a Model for saving the After doing this I've been able to consistently retrieve my |
I have met the same problem as well, my another question is how can i get my invitation from other people's userGroup |
We are legion!
…On Tue, Feb 11, 2020, 10:51 PM tyGavinZJU ***@***.***> wrote:
Been struggling with trying to use UserGroups for over a week now.
I experienced this issue too. And these are my observations.
After you log in, GROUP_MEMBERSHIPS_STORAGE_KEY is added to localStorage.
And it gets populated as you create UserGroups and would look something
like this.
[image: image]
<https://user-images.githubusercontent.com/13279523/73703294-6f66e900-46bd-11ea-8d76-e0d1b9826698.png>
If you lose those values, then you will experience the issue above. What
I'm saying is that somehow, GROUP_MEMBERSHIPS_STORAGE_KEY gets reset to
the default. Which would look something like this.
[image: image]
<https://user-images.githubusercontent.com/13279523/73703545-3a0ecb00-46be-11ea-99a6-8b5521c7341f.png>
When that happens... I don't know if you could decrypt your UserGroups
ever again.
My workaround for this problem is to create a Model for saving the
GROUP_MEMBERSHIPS_STORAGE_KEY values. When the localStorage gets updated,
sync your model with the new value. When you sign out and log back in,
fetch your model then set it to localStorage.
After doing this I've been able to consistently retrieve my UserGroups.
I have met the same problem as well, my another question is how can i get
my invitation from other people's userGroup
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHHE775JBDS5MW744EERCYLRCNW2JANCNFSM4IKVG6DQ>
.
|
You could create a model that looks like this
Then you could query the Maybe? |
As a
from Furthermore, I suggest to use a deterministically derived signing key ( @erikwlarsen @xanderjakeq Re finding invitations, storing this publicly is a privacy concern. |
The fix does not work :-/ due to missing keys for the GroupMembership. |
A better solution is to check the server in
|
use UserGroups.find(id) to retrieving UserGroup decrypted |
I'm having an issue with retrieving UserGroups within my app after logging out and then logging in. If I create a UserGroup, I'm able to access that user group while still logged in with my current session. However, upon logging out and logging back in to the same app, when I retrieve my group memberships, decryption errors are thrown, and the name and members do not get decrypted.
Steps to reproduce:
After user is logged in, create a new group:
const group = new UserGroup({ name: 'my new group' }); await group.create()
;Check to make sure I have group membership:
UserGroup.myGroups().then(console.log);
This shows an array with the group I just created (with
attrs.name === 'my new group'
).Log out
const { userSession } = getConfig(); userSession.signUserOut();
Log back into app, then log my groups again:
UserGroup.myGroups().then(console.log);
Now the same group I just created does show up (the
_id
property matches), but thename
andmembers
properties (underattrs
) are encrypted (They are objects withcipherTask
,ephemeralPK
,iv
, andmac
properties.) I see error logs from their retrieval:Decryption error for key: 'members': num.words is null
Decryption error for key: 'name': num.words is null
One other strange thing: at this point, if I create a group and retrieve it using
UserGroup.myGroups
, I will only see the group I just created, and it will be properly decrypted. I will not see the group that I created during my last session. However, if I log out and log back in again, I'll see both of the groups that I have created, and both will be encrypted (with attendantDecryption error
messages).Thanks for your help, this is a really cool library! Please let me know if I'm doing anything incorrectly.
The text was updated successfully, but these errors were encountered: