gft-mobile-pl / biometric

0 stars 0 forks source link

Deadlock on invoking `BiometricAuthenticator::authenticate` #1

Open mtse-gft opened 3 weeks ago

mtse-gft commented 3 weeks ago

We want to ask user for biometric authentication. In our case we show an empty screen and trigger biometricAuthenticationService.authenticate(authenticationPromptParams).
We expect this method to start biometric authentication process during which user will be shown system biometrics dialog. Randomly, this suspendable function never finishes and it does not show system biometric dialog. In our case, from user perspective it looks like this: image

I suspect this happens due to possible Race Condition in this function, that results in a deadlock in AndroidXBiometricAuthenticator.kt.

image

Unfortunately, I had no time to test my assumption and to offer a fix.

mtse-gft commented 2 weeks ago

UPD. It is much easier to reproduce with Don't keep activities enabled.