Status Update
Comments
al...@tandem.co.uk <al...@tandem.co.uk> #2
java.security.ProviderException: Keystore operation failed
at android.security.keystore.AndroidKeyStoreKeyGeneratorSpi.engineGenerateKey(AndroidKeyStoreKeyGeneratorSpi.java:386)
at javax.crypto.KeyGenerator.generateKey(KeyGenerator.java:612)
at androidx.biometric.CryptoObjectUtils.createFakeCryptoObject(CryptoObjectUtils.java:256)
at androidx.biometric.BiometricManager.canAuthenticateWithStrongBiometricOnApi29(BiometricManager.java:419)
at androidx.biometric.BiometricManager.canAuthenticateCompat(BiometricManager.java:386)
at {packageName}.fingerprint.BiometricUtils.getBiometricSupportLevelForLogin(BiometricUtils.java:3343)
at androidx.biometric.BiometricManager.canAuthenticate(BiometricManager.java:343)
at {packageName}.fingerprint.BiometricUtils.getBiometricSupportLevelForLogin(BiometricUtils.java:19)
at {packageName}.domain.biometrics.GetBiometricsSupportForLoginInteractor.execute(GetBiometricsSupportForLoginInteractor.java:13)
at {packageName}.ui.settings.SettingsViewModel$$special$$inlined$apply$lambda$1$1.invoke(SettingsViewModel.java:85)
at {packageName}.ui.settings.SettingsViewModel$$special$$inlined$apply$lambda$1$1.invokeSuspend(SettingsViewModel.java:85)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.submitToLocalQueue(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:9738)
Caused by: android.security.KeyStoreException: 16
at android.security.KeyStore.getKeyStoreException(KeyStore.java:1552)
at android.security.keystore.AndroidKeyStoreKeyGeneratorSpi.engineGenerateKey(AndroidKeyStoreKeyGeneratorSpi.java:386)
at javax.crypto.KeyGenerator.generateKey(KeyGenerator.java:612)
at androidx.biometric.CryptoObjectUtils.createFakeCryptoObject(CryptoObjectUtils.java:256)
at androidx.biometric.BiometricManager.canAuthenticateWithStrongBiometricOnApi29(BiometricManager.java:419)
at androidx.biometric.BiometricManager.canAuthenticateCompat(BiometricManager.java:386)
at {packageName}.fingerprint.BiometricUtils.getBiometricSupportLevelForLogin(BiometricUtils.java:3343)
at androidx.biometric.BiometricManager.canAuthenticate(BiometricManager.java:343)
at {packageName}.fingerprint.BiometricUtils.getBiometricSupportLevelForLogin(BiometricUtils.java:19)
at {packageName}.domain.biometrics.GetBiometricsSupportForLoginInteractor.execute(GetBiometricsSupportForLoginInteractor.java:13)
at {packageName}.ui.settings.SettingsViewModel$$special$$inlined$apply$lambda$1$1.invoke(SettingsViewModel.java:85)
at {packageName}.ui.settings.SettingsViewModel$$special$$inlined$apply$lambda$1$1.invokeSuspend(SettingsViewModel.java:85)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.submitToLocalQueue(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:9738)
ev...@gmail.com <ev...@gmail.com> #3
Again: Android: 10 Android Build: QP1A.190711.020 Manufacturer: samsung Model: SM-G781W
It seems that this issue happens on Samsung phones running Android 10.
[Deleted User] <[Deleted User]> #4
I was able to reproduce the same issue using a Samsung Galaxy S20 running Android 10.
Basically, what I have to do to reproduce this issue was to register only Face Recognition (which is a weak authenticator) in the phone and then try to use the app that I'm implementing.
As soon as I registered a Fingerprint in the device, I was not able to reproduce this issue anymore.
Also, I've noticed that my app was also calling the same method twice because of the logic that I had on my observables.
In summary, the issue with BiometricManager.canAuthenticate(BIOMETRIC_STRONG)
is easier to reproduce if the method is called more than once in a row and on a Samsung phone with only Face Recognition registered.
I don't think that calling the method multiple times is the root cause of this issue, but I think it makes easier to the reproduce the issue. Possibly, the error occurs because the biometrics framework is not ready/busy to process the request and returns a KeyStoreException: 16
.
pr...@gmail.com <pr...@gmail.com> #5
cu...@google.com <cu...@google.com>
th...@google.com <th...@google.com> #6
[Deleted User] <[Deleted User]> #7
sy...@atlassian.com <sy...@atlassian.com> #8
de...@gmail.com <de...@gmail.com> #9
kc...@google.com <kc...@google.com>
vl...@gmail.com <vl...@gmail.com> #10
162013003
ly...@gmail.com <ly...@gmail.com> #11
[Deleted User] <[Deleted User]> #12
sp...@google.com <sp...@google.com>
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
Author: Hao Dong <
Link:
Propogate cancel authentication in onStop() for all api levels.
Expand for full commit details
Propogate cancel authentication in onStop() for all api levels.
Bug: 149770989
Test: ./gradlew biometric:biometric:assemble
Change-Id: I8c393f400d60f2b2af075671c4cf2727e63d82b8
Files:
- M
biometric/biometric/src/main/java/androidx/biometric/BiometricFragment.java
Hash: 302fab7c34832a989f434e43f16b146d37fa08b6
Date: Wed Nov 13 02:45:59 2024
Description
Note : I am using androidx.biometric:biometric:1.0.1
Logs:
2020-02-19 15:40:27.808 1808-1828/? E/System: Uncaught exception thrown by finalizer
2020-02-19 15:40:27.808 1808-1828/? E/System: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.res.StringBlock.close()' on a null object reference
at android.content.res.ApkAssets.close(ApkAssets.java:195)
at android.content.res.ApkAssets.finalize(ApkAssets.java:185)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:919)
2020-02-19 15:40:27.808 1808-1828/? W/System: A resource failed to call release.