cordova-plugin-fingerprint-aio: onAuthenticationFailed should return plugin error
Bug report
Description
This error handler is not implemented properly: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio/blob/7541dc3ebfaa1c3f7e59ea220ba51ba317d148bc/src/android/BiometricActivity.java#L81-L83
It doesn’t call onError: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio/blob/7541dc3ebfaa1c3f7e59ea220ba51ba317d148bc/src/android/BiometricActivity.java#L117
This leads to a bug that the plugin never returns any error to cordova & thus nothing happens.
- What did you do? On my OnePlus 6T device I executed the in-display fingerprint scanner & used the wrong finger to authenticate.
- What did happen? Nothing happened. After debugging I found this bug.
- What did you expect to happen? That the plugin returns an error code so the webview can inform the user.
Environment
- Plugin version 3.0.1
Installed platforms:
android 8.1.0
ios 5.1.1
Available platforms:
browser ^6.0.0
electron ^1.0.0
osx ^5.0.0
windows ^7.0.0
I can provide a fix for this but have a question:
Which error should be returned?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 30 (8 by maintainers)
Commits related to this issue
- android: handle onAuthenticationFailed Closes #247 — committed to NiklasMerz/cordova-plugin-fingerprint-aio by NiklasMerz 4 years ago
Please check out the branch from PR #236 . This PR contains major refactorings and may work differently. I am still trying to get this stable for the next version.
@NiklasMerz can you please verify on your OnePlus device whether the fix provided you in @4.0.1 is still working or not ?
Please respond.
@NiklasMerz sorry to disturb you. Can you please check once on your OnePlus 6T device with latest build @4.0.1 ?
Seems like the fix given is not working any more 😦
Can you please confirm if it’s working on your phone ?
Thx for fixing this 🙂 I was on vacation so didn’t see these messages. We’ll test it out asap
@Abhishek-Kanitkar for this fix you can update the cordova version without ionic native. ionic native is just for typing (and dependency injection). It does not directly depend on the native cordova plugin code.
@Abhishek-Kanitkar I understand! That’s totally fine. Luckily a OP 6T is my personal and only device I have 😄
In my tests I could hit the back button to cancel the authentication after a failed attempt. Then you will get the cancelled response.
I will see if I can have a look at this in the next few days.