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

KeyProvider23.java line 80 #1109

Closed
fernando-owlapps opened this issue Aug 2, 2019 · 3 comments
Closed

KeyProvider23.java line 80 #1109

fernando-owlapps opened this issue Aug 2, 2019 · 3 comments
Assignees
Labels
bug Something isn't working closing soon Issue will auto-close if there is no additional activity within 7 days. cognito Issues with the AWS Android SDK for Cognito pending-community-response Issue is pending response from the issue requestor

Comments

@fernando-owlapps
Copy link

Describe the bug
We're getting a very high volume of AWS library crashes in Firebase Crashlytics, could you check?

Which AWS service(s) are affected?
Android SDK 2.13.5
implementation "com.amazonaws:aws-android-sdk-core:2.13.5"
implementation "com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.13.5"
implementation "com.amazonaws:aws-android-sdk-appsync:2.10.0"

Screenshots
image
image

Additional context
Firebase Crashlytics.

Fatal Exception: java.lang.RuntimeException: Unable to create application com.pontomobi.smiles.SmilesApplication: java.lang.IllegalStateException: Error in initializing the CognitoCachingCredentialsProvider. 
       at android.app.ActivityThread.handleBindApplication + 6499(ActivityThread.java:6499)
       at android.app.ActivityThread.access$1800 + 229(ActivityThread.java:229)
       at android.app.ActivityThread$H.handleMessage + 1887(ActivityThread.java:1887)
       at android.os.Handler.dispatchMessage + 102(Handler.java:102)
       at android.os.Looper.loop + 148(Looper.java:148)
       at android.app.ActivityThread.main + 7406(ActivityThread.java:7406)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1230(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main + 1120(ZygoteInit.java:1120)
Caused by java.lang.IllegalStateException: Error in initializing the CognitoCachingCredentialsProvider. 
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.initialize + 434(CognitoCachingCredentialsProvider.java:434)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.<init> + 190(CognitoCachingCredentialsProvider.java:190)
       at com.pontomobi.smiles.SmilesApplication.onCreate + 152(SmilesApplication.java:152)
       at android.app.Instrumentation.callApplicationOnCreate + 1037(Instrumentation.java:1037)
       at android.app.ActivityThread.handleBindApplication + 6496(ActivityThread.java:6496)
       at android.app.ActivityThread.access$1800 + 229(ActivityThread.java:229)
       at android.app.ActivityThread$H.handleMessage + 1887(ActivityThread.java:1887)
       at android.os.Handler.dispatchMessage + 102(Handler.java:102)
       at android.os.Looper.loop + 148(Looper.java:148)
       at android.app.ActivityThread.main + 7406(ActivityThread.java:7406)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1230(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main + 1120(ZygoteInit.java:1120)
Caused by java.lang.IllegalStateException: java.security.UnrecoverableKeyException: Failed to obtain information about key
       at com.amazonaws.internal.keyvaluestore.KeyProvider23.getKey + 84(KeyProvider23.java:84)
       at com.amazonaws.internal.keyvaluestore.AWSKeyValueStore.setPersistenceEnabled + 131(AWSKeyValueStore.java:131)
       at com.amazonaws.internal.keyvaluestore.AWSKeyValueStore.<init> + 108(AWSKeyValueStore.java:108)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.initialize + 425(CognitoCachingCredentialsProvider.java:425)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.<init> + 190(CognitoCachingCredentialsProvider.java:190)
       at com.pontomobi.smiles.SmilesApplication.onCreate + 152(SmilesApplication.java:152)
       at android.app.Instrumentation.callApplicationOnCreate + 1037(Instrumentation.java:1037)
       at android.app.ActivityThread.handleBindApplication + 6496(ActivityThread.java:6496)
       at android.app.ActivityThread.access$1800 + 229(ActivityThread.java:229)
       at android.app.ActivityThread$H.handleMessage + 1887(ActivityThread.java:1887)
       at android.os.Handler.dispatchMessage + 102(Handler.java:102)
       at android.os.Looper.loop + 148(Looper.java:148)
       at android.app.ActivityThread.main + 7406(ActivityThread.java:7406)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1230(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main + 1120(ZygoteInit.java:1120)
Caused by java.security.UnrecoverableKeyException: Failed to obtain information about key
       at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreSecretKeyFromKeystore + 275(AndroidKeyStoreProvider.java:275)
       at android.security.keystore.AndroidKeyStoreSpi.engineGetKey + 97(AndroidKeyStoreSpi.java:97)
       at java.security.KeyStore.getKey + 253(KeyStore.java:253)
       at com.amazonaws.internal.keyvaluestore.KeyProvider23.getKey + 80(KeyProvider23.java:80)
       at com.amazonaws.internal.keyvaluestore.AWSKeyValueStore.setPersistenceEnabled + 131(AWSKeyValueStore.java:131)
       at com.amazonaws.internal.keyvaluestore.AWSKeyValueStore.<init> + 108(AWSKeyValueStore.java:108)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.initialize + 425(CognitoCachingCredentialsProvider.java:425)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.<init> + 190(CognitoCachingCredentialsProvider.java:190)
       at com.pontomobi.smiles.SmilesApplication.onCreate + 152(SmilesApplication.java:152)
       at android.app.Instrumentation.callApplicationOnCreate + 1037(Instrumentation.java:1037)
       at android.app.ActivityThread.handleBindApplication + 6496(ActivityThread.java:6496)
       at android.app.ActivityThread.access$1800 + 229(ActivityThread.java:229)
       at android.app.ActivityThread$H.handleMessage + 1887(ActivityThread.java:1887)
       at android.os.Handler.dispatchMessage + 102(Handler.java:102)
       at android.os.Looper.loop + 148(Looper.java:148)
       at android.app.ActivityThread.main + 7406(ActivityThread.java:7406)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1230(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main + 1120(ZygoteInit.java:1120)
Caused by android.security.KeyStoreException: -49
       at android.security.KeyStore.getKeyStoreException + 945(KeyStore.java:945)
       at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreSecretKeyFromKeystore + 275(AndroidKeyStoreProvider.java:275)
       at android.security.keystore.AndroidKeyStoreSpi.engineGetKey + 97(AndroidKeyStoreSpi.java:97)
       at java.security.KeyStore.getKey + 253(KeyStore.java:253)
       at com.amazonaws.internal.keyvaluestore.KeyProvider23.getKey + 80(KeyProvider23.java:80)
       at com.amazonaws.internal.keyvaluestore.AWSKeyValueStore.setPersistenceEnabled + 131(AWSKeyValueStore.java:131)
       at com.amazonaws.internal.keyvaluestore.AWSKeyValueStore.<init> + 108(AWSKeyValueStore.java:108)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.initialize + 425(CognitoCachingCredentialsProvider.java:425)
       at com.amazonaws.auth.CognitoCachingCredentialsProvider.<init> + 190(CognitoCachingCredentialsProvider.java:190)
       at com.pontomobi.smiles.SmilesApplication.onCreate + 152(SmilesApplication.java:152)
       at android.app.Instrumentation.callApplicationOnCreate + 1037(Instrumentation.java:1037)
       at android.app.ActivityThread.handleBindApplication + 6496(ActivityThread.java:6496)
       at android.app.ActivityThread.access$1800 + 229(ActivityThread.java:229)
       at android.app.ActivityThread$H.handleMessage + 1887(ActivityThread.java:1887)
       at android.os.Handler.dispatchMessage + 102(Handler.java:102)
       at android.os.Looper.loop + 148(Looper.java:148)
       at android.app.ActivityThread.main + 7406(ActivityThread.java:7406)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1230(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main + 1120(ZygoteInit.java:1120)
@palpatim
Copy link
Member

palpatim commented Aug 2, 2019

Working on a fix for this now as part of #937

@palpatim
Copy link
Member

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.

@palpatim palpatim added pending-community-response Issue is pending response from the issue requestor and removed Investigating labels Aug 21, 2019
@desokroshan desokroshan added the closing soon Issue will auto-close if there is no additional activity within 7 days. label Aug 30, 2019
@stale
Copy link

stale bot commented Sep 6, 2019

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@stale stale bot closed this as completed Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing soon Issue will auto-close if there is no additional activity within 7 days. cognito Issues with the AWS Android SDK for Cognito pending-community-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

4 participants