-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Authenticated Option on Samsung device throws Exception #12
Comments
Hello, I've not been getting all those exceptions, but when I try to use the Write function it does throw this: AuthException (code: AuthExceptionCode.unknown, message: Unexpected authentication error. the master key android-keystore://biometrics_master_key exists but is unusable). This is occurs on my emulators and my physical phone (all using Android). |
I have just checked and I get this same issue with the example app after trying to use all of the write options, apart for the Unauthenticated option. |
@html-rulez-d00d @P-Jay357 |
@rokk4 I have since moved on from this plugin, which is a shame since it's exactly what I wanted, minus the inconsistency with Samsung devices. I now use local_auth and flutter_secure_storage (3.3.2 since newer versions have issues) begrudgingly, since that flow is less secure. |
If anyone has a way to fix this let me know, not for me in samsung s9+ everything seems fine.. and imho the api calls are all used according to the documentation |
Note: if i uncheck the "Save Password with biometric key store?" option it works. |
The issue occurs on my Huawei P9, and different emulators as well. |
https://issuetracker.google.com/issues/176215143 Some folks on SO found out it is somehow related to |
It would be nice at least to add an option in the settings page to disable the I dont want to use biometrics. It's ok for me to enter my password each time i login, but unchecking that checkbox manually is a bit annoying |
Maybe this biometric_storage/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStorageFile.kt Line 58 in 81e1bc9
should be There also this article https://weidianhuang.medium.com/how-to-write-thread-safe-code-for-android-keystore-40a0fa17f416 |
Hello everyone, I got the same issue as well on a Samsung A51 with the use of FaceID. |
same problem on Samsung Galaxy S10Lite - FaceID is unusable due to this error. |
I have just pushed a complete reimplementation how the encryption works, by directly using the underlying Maybe somebody could give it a try if anything still works? 😅️ (Since this uses a completely different set of keys, old data would be lost. Right now there is a fallback which tries to use the old decryption methods if old data is still around, but the end goal would be to remove the whole |
Hi, thanks for replying and reimplementing the package! AuthException{code: AuthExceptionCode.unknown, message: Cancel} 0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597:7) The message parameter of the AuthException is the value of the AndroidPromptInfo "negativeButton" parameter. If I press the back button on my device instead when the fingerprint dialog is showing I get a similar error, but this time the code is "AuthExceptionCode.userCanceled" and the message is "Fingerprint operation cancelled by user" This is while using the 3.0.0-rc.9 pre-release version of the package. |
Also, I'm not sure if it's anything you have control of, but the negativeButton text is black, and the fingerprint dialog is a dark grey. Do we have anyway of choosing the colours of the dialog? I have noticed that on an Android emulator the fingerprint dialog has a white background, but on my phone it's the dark grey. The emulator is on android 10 though and my phone is using Android 7 |
thanks for testing.. when you press cancel (or pressing back button)
no, not directly at least. It is a native android dialog which is provided by the system. Although with googling it seems the application can customize the theme: https://stackoverflow.com/a/57429163/109219 so it might be a problem with the example app.. But I don't think the plugin could change this. |
@P-Jay357 fyi, i've now fixed the I also can't reproduce your android 7 problem. I've tried the simulator and it seems to work.. It might have to do with your specific android device. But again, I doubt this is something which the plugin can change anyway. |
Awesome! Thanks for having a look. |
Hi, I think I've found another bug. Sorry! PlatformException(Unexpected Error, Crypto-based authentication is not supported for device credential prior to API 30., java.lang.IllegalArgumentException: Crypto-based authentication is not supported for device credential prior to API 30. It happens if I press the write or read buttons of the test code that have authentication. This occurs when running the app on my phone which is on Android 7. If it's set to true then it works as intended. |
I don't really think this is a bug. Maybe needs some more documentation. But the caller probably has to decide what is the preferable fix.. this is not something the plugin can take a guess on.. |
If I set AuthException{code: AuthExceptionCode.unknown, message: Unexpected authentication error. null} If |
Hi! I've just tested the new version and no longer get the error :) |
I've found another error similar to the If you have the Biometric prompt dialog showing and exit the app and then go back to it, this error is thrown:
I believe the ideal behaviour would be that the dialog does not close when you go back onto the app, but if that's not the case then could you set the error code to be |
well the android side already handled it, but the dart side ignored it.. I didn't quite know when this error was actually triggered. I don't think |
fyi, i've now released |
omfg, it seems this is even more complicated than this.. because when
|
Greetings and thank you for creating this plugin!
I was able to get your example working (v1.1.0+1) while using the Biometric Authenticated option on my iPhone X (14.2) and my Pixel 3 (Android 11) just fine but on my Samsung S8+ (Android 9, One UI 1.0) when I write, it throws the following exception:
Please advise.
The text was updated successfully, but these errors were encountered: