Open anshul-kai opened 5 years ago
Yes, me too.
The internal cause is UnrecoverableKeyException: Failed to obtain information about key
Thanks for sharing @danielgindi. I added some try/catches to my production code and am noticing a few CryptoFailedException
as well. It would be a good idea to add to documentation that this won't work on some devices. Works on 95%+ devices from what I'm noticing.
Thoughts @oblador?
I think it's a timing issue. The keychain may be locked/unlocked depending on some user action, how long since they unlocked the device or something like that.
I'm noticing this on the Nexus_5X (API 27) emulator I am using.
Get the exception Could not get key from Keystore
I've been experiencing The provided service/key could not be found in the Keystore
, which from my reading of the code, shouldn't be possible, because it would mean the value is there, but its encryption key is not.
@hellogerard Did you find any solution for this ? I am facing same issue
@dhanashree27 I found that these users uninstalled and reinstalled the app for some reason. Uninstalling the app will wipe SharedPreferences and Keystore entries for the app. But if you have Google Auto Backup on (which is the default), then when you reinstall the app, your SharedPreferences will get restored, restoring your encrypted values. But Auto Backup does not backup your Keystore, so then you will have the values but not the keys, resulting in this error.
But Auto Backup does not backup your Keystore, so then you will have the values but not the keys, resulting in this error.
Any suggestions how to solve that?
I'm consistently receiving errors on my Android 8.0 where I'm unable to perform any Keystore actions. I'm not too familiar with the Keychain and wondering if it doesn't work consistently in certain use cases?