Aws-sdk-android: AWSKeyValueStore: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias

Created on 23 Sep 2020  路  1Comment  路  Source: aws-amplify/aws-sdk-android

Describe the bug
I am getting below error logs while initializing the MobileClient instance. I don't have any issues in SignIn or SignUp. Also, I don't get any crashes. I am not getting these logs once after successful SignIn/SignUp. I am getting it only on a new install of the app.

I just want to know what are these error logs & what can I do to resolve this issue?

I/AWSKeyValueStore: Detected Android API Level = 29
I/AWSKeyValueStore: Creating the AWSKeyValueStore with key for sharedPreferencesForData = com.amazonaws.mobile.client
I/AWSKeyValueStore: Detected Android API Level = 29
I/AWSKeyValueStore: Creating the AWSKeyValueStore with key for sharedPreferencesForData = com.amazonaws.android.auth
I/AWSKeyValueStore: Detected Android API Level = 29
I/AWSKeyValueStore: Creating the AWSKeyValueStore with key for sharedPreferencesForData = com.amazonaws.android.auth
E/AWSKeyValueStore: com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.android.auth.aesKeyStoreAlias
I/AWSKeyValueStore: Deleting the encryption key identified by the keyAlias: com.amazonaws.android.auth.aesKeyStoreAlias
E/AWSKeyValueStore: Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = us-west-2:62XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX8a28.identityId
E/AWSKeyValueStore: com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.android.auth.aesKeyStoreAlias
I/AWSKeyValueStore: Deleting the encryption key identified by the keyAlias: com.amazonaws.android.auth.aesKeyStoreAlias
E/AWSKeyValueStore: Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = us-west-2:62XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX8a28.expirationDate
I/AWSKeyValueStore: Detected Android API Level = 29
I/AWSKeyValueStore: Creating the AWSKeyValueStore with key for sharedPreferencesForData = CognitoIdentityProviderCache
E/AWSKeyValueStore: com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore: Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore: Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = provider
E/AWSKeyValueStore: com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore: Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore: Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = token
E/AWSKeyValueStore: com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore: Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore: Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = cognitoIdentityId
E/AWSKeyValueStore: com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore: Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore: Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = isFederationEnabled

To Reproduce
A code sample or steps:

AWSMobileClient.getInstance().initialize(context, new Callback<UserStateDetails>() {
            @Override
            public void onResult(UserStateDetails userStateDetails) {
                switch (userStateDetails.getUserState()) {
                    case SIGNED_IN:
                        Log.e("INIT", "SIGNED_IN");
                        break;
                    case SIGNED_OUT:
                        Log.e("INIT", "SIGNED_OUT");
                        break;
                    default:
                        AWSMobileClient.getInstance().signOut();
                        break;
                }
            }

            @Override
            public void onError(Exception e) {
                Log.e("INIT", e.toString());
            }
        });

Which AWS service(s) are affected?
com.amazonaws:aws-android-sdk-mobile-client:2.19.0

Environment Information (please complete the following information):

  • AWS Android SDK Version: aws-android-sdk-mobile-client:2.19.0
  • Device: OnePlus 5T
  • Android Version: Android Q [OxygenOS version 10.0.0]
  • Specific to simulators: No
AWSMobileClient Usage Question

Most helpful comment

These are bad logs and don't indicate a problem - they can be safely ignored.

>All comments

These are bad logs and don't indicate a problem - they can be safely ignored.

Was this page helpful?
0 / 5 - 0 ratings