-
Notifications
You must be signed in to change notification settings - Fork 549
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 encryption key used for secure storage of credentials #937
Comments
@iam1492 Is this the very first run of the app after upgrading to This issue occurs when the SDK is not able to load the key from the KeyStore. The key from the KeyStore is used to securely store the information persisted by the |
Old version was 2.9.0. And now I downgrade to 2.11.1 to solve this issue. (I cannot go back to 2.9.0 again because of aws database downgrade issue- from 6 to 5) |
same issue. always crash in Android 4 and 5. |
We are also seeing this crash in production after we upgraded our AWS SDKs from 2.13.1 to 2.13.3. Our android app uses the Thanks for these wonderful libraries, and I hope we can have this fixed soon! |
@kvasukib these crashes are occurring in production, so we cannot see any log statements such as the ones you are requesting because our app doesn't log in production. I am not able to repro them locally, unfortunately. Are you able to estimate how soon a fix for this can be ready? If it is still unknown, we may want to roll back to 2.13.1 until it is fixed. Thanks! |
@kvasukib I will however add that this crash appears to be occurring on app startup. So it seems very unlikely that key generation had previously succeeded during the app's lifecycle. |
@kvasukib to add some context to what @ygnessin wrote, we started seeing crashes in production when we upgraded our AWS SDK from 2.12.5 to 2.13.1, so we will probably downgrade further if this issue won't be resolved soon. Thanks for taking a look. |
@kvasukib I'm not sure if this is related or represents a separate issue altogether, but in addition to the
This crash is less frequent than the one posted in this issue, and appears to be affecting all android versions, unlike KeyProvider18 which only affects Android 5 and lower. In the meantime, we will be rolling back our AWS SDK versions to 2.12.5 until these issues are resolved. Please let me know if you'd like me to open a separate issue for this crash, and apologies if these messages are spamming your inbox. Thank you! |
@iam1492 For the issue where KeyProvider18 encrypts the key that encrypts the data and stores the encrypted key in SharedPreferences. From the stack trace, I could see that the encrypted key is found in SharedPreferences. However we are not able to decrypt the encrypted key that is read from SharedPreferences. Do you see the exception being logged from Line 136 in 8741609
@ygnessin I see your issue as a separate issue. From the research I could see that this error could happen if the device's protection status could have changed (when user tries to |
I'm having lots of crashes because of this.
This is really critical. |
@kvasukib thanks for looking into this. It makes since that the Unfortunately, I haven't been able to reproduce either of the issues locally, but we are seeing these traces come from production. I still believe that this is happening on app startup, because we are using Dagger2 to initialize cognito and inject it. Sorry that I can't be of more help right now, and thank you for looking into this critical issue! |
We're suffering from this error as well. AWS Libraries Device When this is called,
The following error is received. The error is in Stack trace leading up to the freeze
|
Thank you the details and the stack-trace. There are multiple issues here with
Thank you for the patience. I am working on the root-cause. |
this is a big problem |
@hvar90 The problem you reported is different from this GitHub issue. The exception you are facing is due to the network being offline in the device that is making a network call. |
@kvasukib have there been any updates on this? It is preventing us from keeping our SDKs up to date. Thanks for all your hard work! |
I suspect this issue is related to: |
Further to the notes I left against awslabs/aws-mobile-appsync-sdk-android#137, a number of the users who experience this issue with our apps have had their accounts deleted and recreated in Cognito with the same email address (username) on several occasions. The only way we can restore access for these users is to ask them to clear the application data storage, which obviously clears whichever broken parts of the keystore are preventing Cognito from correctly authenticating. |
Is there any approximate date of when there will be a fix? |
@rodrigoarias Sorry for the delayed response. We are still working on the issue. Currently we have the following two issues: Crash in API 23-28: Do you have any successful attempts in reproducing the issue locally? |
@kvasukib No, I wasn't able in any of my devices |
We are also getting reports of this crash on some users' devices, after updating SNS SDK to 2.13.5 Devices reported (
Devices reported (
Also not able to reproduce on local devices. |
@SolisNestor nice find! I can confirm that in our app we also have the following in our manifest:
In our
Perhaps there is a solution for this issue that can be implemented by excluding a certain domain/path from backup? Thanks! |
I see the same issues on the example provided on github: https://github.com/awslabs/aws-sdk-android-samples/tree/master/AmazonCognitoAuthDemo Running the app the first time seems to work fine. Running it a second time, results in the following errors using different Android versions (I'm using th emulators). I/AWSKeyValueStore: Detected Android API Level = 27 |
We downgraded the SNS SDK from 2.13.5 to 2.12.5 (based on some reports here, it seemed that this might solve the issue for the moment), but still get this error reported from some user devices. |
Getting quite a few crashes, using Caused by java.lang.IllegalStateException
java.lang.IllegalArgumentException: key == null com.amazonaws.internal.keyvaluestore.KeyProvider18.getKey + 98 (KeyProvider18.java:98) Is the issue being worked on? |
We Downgraded to 2.12.5 now; Subcribed here, for news , about this issue ! Thanks ! |
Steps to reproduce: - Enable and set the device lock screen pin - Open the application - Disable the device lock screen pin - Open the application again Issue: aws-amplify#937
Any news? Is this getting fixed soon? |
We found some workarounds, but unfortunately this issue has NOT been solved yet.
AWS SDK: Android OS: |
I am actively working on a fix for this problem and will update here when we roll out a fix. |
We released a fix for this on 2.15.1. Please let us know if you have any questions or continue to see crashes related to retrieving encrypted data. |
I've been testing with the 2.15.1 release for a week now and haven't seen the issue anymore. Looks like the issue has been fixed. Thanks for the update! |
Released 2.15.1 this week and no crashes so far. |
So far so good, thanks for the fix. |
Thanks for the feedback! |
Oh yes! I spent two days in this, can I name you god? |
Describe the bug
Upgrade to 2.13.3 make app crash.
To Reproduce
A code sample or steps:
I use dagger2 to inject s3client.
Below is my code in AmazonModule(dagger module) to initialize CognitoCachingCredentialsProvider.
Which AWS service(s) are affected?
App crash
Expected behavior
Non crash
Screenshots
App crash
Environment Information (please complete the following information):
Additional context
I added the call stack of my crash
The text was updated successfully, but these errors were encountered: