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

Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = provider #27

Closed
JoaquimFlavio opened this issue Apr 5, 2020 · 1 comment

Comments

@JoaquimFlavio
Copy link

I tryed generete my apk folowing Flutter Tutorial and now my app is broken.

I don't understood the error...

D/PluginScaffold( 7236): invoke { channel: com.pycampers.flutter_cognito_plugin, method: isSignedIn(), args: null }
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = provider
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = token
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = cognitoIdentityId
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = isFederationEnabled
D/AWSMobileClient( 7236): Inspecting user state details

pleas help-me

@JoaquimFlavio
Copy link
Author

Good morning.

I passed the all night altering the all files of Android path, and on moment of despair, i copy the Android path of the example code, and this worked!!!

Well, it works. But is not the natural way... the same erro ocorred again...

For solved my problem, the solution its a very very simple.... i noticed the same erro in first initialize of example code, and this is obvioly: in first execute don't exist nothin in AndroidKeyStore..... I make a try{}catch(){} where i init the package and if case a get this exception the app execute the login process.

my solution:

Future<bool> inicializa(context, User user) async {
    try {
      print(await Cognito.initialize());

      if(!await Cognito.isSignedIn()) {
        return false;
      }

      return true;
    } catch (err) {
      print('Initter eror: ${err}');
      return false;
    }
  }

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

No branches or pull requests

1 participant