authpass / biometric_storage

Flutter plugin to store data behind biometric authentication (ie. fingerprint)
https://pub.dev/packages/biometric_storage
MIT License
184 stars 107 forks source link

Error while writing data: -25291: No keychain is available. You may need to restart your computer.<…> #25

Closed deyong84 closed 3 years ago

deyong84 commented 3 years ago

This exception when i try to authentication using Face ID on iphone XR, biometrict_storage : 1.1.0+1

Screen Shot 2021-07-05 at 10 24 50

please help. thankyou.

hpoul commented 3 years ago

I doubt this is a problem with the plugin. You might want to check the device logs. Last time I came across that error message the log files revealed:

AppleKeyStore: operation failed (pid: 92 sel: 43 ret: e007c007 '-536363001')

I inquired with apple support at that time and their response was:

AppleKeyStore (AKS) is a kernel component that wrangles keys, including keys protected by the Secure Enclave (as are all Face ID keys). This error corresponds to “bad device key”, but that doesn’t tell us much. Somehow the device has got itself into a state where AKS is unable to unwrap a key, and it’s not at all clear how.

I’ve seen this problem before. It seems to crop up very rarely on user devices. AFAIK it has nothing to do with your code. Indeed, we have bugs on file for these symptoms that don’t involve any third-party code at all.

There’s two things you can do here:

  • You should file a bug about this, making sure to attached the sysdiagnose log.

https://developer.apple.com/bug-reporting/

It’s possible, although I admit that this possibility is unlikely, that the AKS team will be able to learn more about this problem from this log.

Please send me your bug number so that I can associate it with this incident.

  • On the workaround front, this is something I mentioned to earlier: The problem only seems to affect existing keys, so if you you delete and re-create the key you should be all set.

so if your problem is similar you either try to delete all keys and then set it again.. and if the problem persist contact apple support.

Unless there are more hints that this might be a bug in the plugin, i'll close the issue.