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

KeyStore exception in log on Android 9 device #39

Open
kfjtrifork opened this issue Oct 4, 2018 · 6 comments
Open

KeyStore exception in log on Android 9 device #39

kfjtrifork opened this issue Oct 4, 2018 · 6 comments
Assignees
Labels

Comments

@kfjtrifork
Copy link

Thx for a great library.
When running on a Android 9 device (Pixel) I see an error in the log. This happens both when target api is set to Android 9 (28) and earlier (tested with 26). This exception is not propagated to the calling app.
This error does not occur when running older Android devices (tested on Android 8 and 6).
I can't tell the severity of this error (the call to "KeyStore.entryInstanceOf" probably fails, which is part of an if statement) but hope you can :)
BR, Kristian

Stacktrace:
W/KeyStore: KeyStore exception
android.os.ServiceSpecificException: (code 7)
at android.os.Parcel.createException(Parcel.java:1956)
at android.os.Parcel.readException(Parcel.java:1910)
at android.os.Parcel.readException(Parcel.java:1860)
at android.security.IKeystoreService$Stub$Proxy.get(IKeystoreService.java:786)
at android.security.KeyStore.get(KeyStore.java:195)
at android.security.keystore.AndroidKeyStoreSpi.engineGetCertificate(AndroidKeyStoreSpi.java:144)
at java.security.KeyStoreSpi.engineEntryInstanceOf(KeyStoreSpi.java:583)
at java.security.KeyStore.entryInstanceOf(KeyStore.java:1631)
at devliving.online.securedpreferencestore.EncryptionManager.loadKey(EncryptionManager.java:690)
at devliving.online.securedpreferencestore.EncryptionManager.setup(EncryptionManager.java:228)
at devliving.online.securedpreferencestore.EncryptionManager.(EncryptionManager.java:201)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.(SecuredPreferenceStore.java:79)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.init(SecuredPreferenceStore.java:134)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.init(SecuredPreferenceStore.java:142)
at ...

@iamMehedi iamMehedi self-assigned this Dec 5, 2018
@iamMehedi iamMehedi added the bug label Dec 5, 2018
@iamMehedi
Copy link
Owner

looking into it!

TonyTangAndroid pushed a commit to TonyTangAndroid/Secured-Preference-Store that referenced this issue Jan 20, 2019
@brspurri
Copy link

Seeing the same error when using implementation 'online.devliving:securedpreferencestore:0.7.4'. Only on OS 9 devices.

@ber4444
Copy link

ber4444 commented Apr 10, 2019

@AlvaroBro
Copy link

Hi! Any news or feedback on this? I'm experiencing the same thing in Android 9.

@MarimuthuP
Copy link

Hi! Still I'm getting the same exception even after changing getKey() and getCertificate() methods instead of getEntry() in Android 9. Is there any updated solution on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants