Keychain is working perfectly fine in iOS, but no luck in Android. I am totally blocked by this. What seems the problem with my code? Can you help me guys?
Error: Could not encrypt data for service RN_KEYCHAIN_DEFAULT_ALIAS
```
const allValues = await readKeychain();
try{
await Keychain.setGenericPassword('mykey','value', {
accessible: Keychain.ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,
});
}catch(e){
// I logged it here
}
We've seen this issue on a Sony Xperia, Running Android 8.0.0. It appears device specific at this stage. Other Android users with a range of devices are fine.
Issue appears to be here.
Unfortunately, our error tracking isn't passing the actual error which is thrown, just the CryptoFailedException with a generic description.
Can anything be done for this? It's happening on Nexus 5X - 8.1.0 emulator as well.
I just started to have this problem. I was running 8.1.0 on a Nexus 5X on the emulator and out of nowhere this error popped up. It would be nice to have an update on this error...
I am having this same issue on Nexus 5X emulator 8.1.0.
Same issue on Nexus 5X emulator (Android 8.1.0), running react-native 0.57.8 with react-native-keychain 3.0.0. Any fixes for this yet?
There are now 6 people having this issue. If you can reproduce the issue, you can also fix it :) It would be great if someone could step up, fix it and submit a PR. Thanks.
So, i don't know if it is exactly related since my code differs from the snippet @dnt-andinieves posted but i was getting this when password/value content got bigger, i can't say exactly at which point, but a content shortening/downsizing made the error "disappear".
馃憤 bump!
Any update for this issue?
One of possibility is not enought storage space on emulator or phone. Please checks that.
Most helpful comment
馃憤 bump!