epicshaggy / capacitor-native-biometric

186 stars 95 forks source link

Stops working on Android and need to restart to make it work again #104

Open swanswanmta opened 1 year ago

swanswanmta commented 1 year ago

It can no longer retrieve the credentials until the phone is restart again. It only happens on the android phone.

f1ght4fun commented 11 months ago

Same issue, confirmed on Pixed 6, Android 14 and also same was mentioned by a person after version update on Android 9, please advise!

AbidR-S2 commented 10 months ago

I have a similar problem but there is a workaround.

If you unlock the device using face recognition, then try to use the plugin method getCredentials in my app it fails with the following error:

Sending plugin error: {"save":false,"callbackId":"36493558","pluginId":"NativeBiometric","methodName":"getCredentials","success":false,"error":{"message":"Failed to get credentials"}}

If you unlock the device using a pattern or a fingerprint (not tried passcode) then getCredentials works just fine.

This occurred on a Tab Active 3 (Android 13) and a Tab Active 4 Pro (Android 14). This only happens on Android devices.

selbuk1960 commented 7 months ago

I have a similar problem but there is a workaround.

If you unlock the device using face recognition, then try to use the plugin method getCredentials in my app it fails with the following error:

Sending plugin error: {"save":false,"callbackId":"36493558","pluginId":"NativeBiometric","methodName":"getCredentials","success":false,"error":{"message":"Failed to get credentials"}}

If you unlock the device using a pattern or a fingerprint (not tried passcode) then getCredentials works just fine.

This occurred on a Tab Active 3 (Android 13) and a Tab Active 4 Pro (Android 14). This only happens on Android devices.

Incredible, it took more than 4 hours looking for the error and this solved it. A temporary message can be left for users to let them know what is happening.

mobilityvalley commented 6 months ago

I reproduce this bug many time a day on Android 12, I have only fingerprint available for biometric verification and I don't unlock the phone using the biometry.

For more information I set a first credential it works when I set a second with server value different it does not work

So there is no solution ?

qliqdev commented 6 months ago

Any solution?

I have the same problem

when i unlock Pixel 7 pro with faceid app throws

Error: Failed to get credentials

BiometryType is 6 means that it is MULTIPLE

mobilityvalley commented 6 months ago

There is a bug on android, capacitor 5 I changed the plugin for access to secure storage

qliqdev commented 6 months ago

There is a bug on android, capacitor 5 I changed the plugin for access to secure storage

Would you mind sharing the plugin?

mobilityvalley commented 6 months ago

I installed https://github.com/aparajita/capacitor-secure-storage