atsign-foundation / at_client_sdk

The Dart implementation of atSDK used for implementing Atsign's technology into other software
https://pub.dev/publishers/atsign.org/packages
BSD 3-Clause "New" or "Revised" License
1.46k stars 31 forks source link

Not able to get value for AtKey who doesn't have a shared with #386

Closed sachins-geekyants closed 2 years ago

sachins-geekyants commented 2 years ago

Describe the bug while running @ mosphere pro mobile , I noticed many keys were failing with the message key does not exist in keystore. i.e Exception: @:sentHistory_v2.mospherepro@daily3bossanova does not exist in keystore

SEVERE|2022-01-31 15:48:51.205563|AtContactsImpl|Invalid atsign contact found @AtKey{key: atconnections.thethingaboutmyfolksdry.daily3bossanova.at_contact.mospherepro, sharedWith: null, sharedBy: daily3bossanova, namespace: mospherepro, metadata: Metadata{ttl: null, ttb: null, ttr: null,ccd: null, isPublic: false, isHidden: false, availableAt : null, expiresAt : null, refreshAt : null, createdAt : null,updatedAt : null,isBinary : false, isEncrypted : null, isCached : false, dataSignature: null, sharedKeyStatus: null}, isRef: false} : Exception: @:atconnections.thethingaboutmyfolksdry.daily3bossanova.at_contact.mospherepro@daily3bossanova does not exist in keystore

This was happening only for atKeys which does not have sharedWith.

To Reproduce Steps to reproduce the behavior:

  1. Run @ mosphere pro
  2. contacts , groups and sent history will fail to load.

Expected behavior key should return value.

Smartphone (please complete the following information):

Were you using an @‎application when the bug was found?

gkc commented 2 years ago

Which versions of client libraries are you using?

Message ID: @.***>

sachins-geekyants commented 2 years ago

at_client_mobile: ^3.1.4 at_commons: ^3.0.3 at_contact: ^3.0.3 at_lookup: ^3.0.6 at_onboarding_flutter: ^3.1.3 at_common_flutter: ^2.0.4 at_contacts_flutter: ^4.0.0 at_contacts_group_flutter: ^4.0.0

gkc commented 2 years ago

And is this with your local build, and presumably not the version that is in the App Store and Google Play?

Message ID: @.*** com>

VJag commented 2 years ago

@sachins-geekyants. Can you please update what operation led to the key "@:sentHistory_v2.mospherepro@daily3bossanova"? I mean how did we build the AtKey to get what we got.

sachins-geekyants commented 2 years ago

@VJag I created this AtKey and then performed get operation on it.

AtKey key = AtKey() ..key = ‘sentHistory_v2’ ..sharedBy = ‘atsign’ ..metadata = Metadata();

sachins-geekyants commented 2 years ago

By overriding at_utils to this branch , it's working fine.

gkc commented 2 years ago

(Fixed by https://github.com/atsign-foundation/at_tools/pull/141 )