Fixed
Status Update
Comments
py...@gmail.com <py...@gmail.com> #2
Even I'm also facing same exception issue. When user failed biometrics multiple times(5) and biometric is locked there is no way to find if biometrics can be shown or not. If user tries to enable again within the 30 sec time limit app is crashing. Please fix it ASAP.
Logs :
java.lang.IllegalStateException: Fragment already added: BiometricFragment{60be538 #2 BiometricFragment}
at androidx.fragment.app.FragmentManagerImpl.addFragment(FragmentManager.java:1916)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:765)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
at androidx.fragment.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6680)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Logs :
java.lang.IllegalStateException: Fragment already added: BiometricFragment{60be538 #2 BiometricFragment}
at androidx.fragment.app.FragmentManagerImpl.addFragment(FragmentManager.java:1916)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:765)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
at androidx.fragment.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6680)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
rb...@unwire.com <rb...@unwire.com> #3
We are unable to reproduce this issue with latest version of androidx.biometric (androidx.biometric:biometric:1.0.0-alpha03)
Re: comment #2 : Its similar to issue 117105236 (which is fixed).
Please check with latest version of the support libs & let us know the results.
If you are still able to reproduce this issue then provide the following info :
Provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory. Attach the bug report file to this issue.
Alternate method:
After reproducing the issue, navigate to developer settings, ensure ‘USB debugging’ is enabled, then enable ‘Bug report shortcut’. To take bug report, hold the power button and select the ‘Take bug report’ option.
NOTE: Please upload the files to Google Drive and share the folder to android-bugreport@google.com, then share the link here.
Re:
Please check with latest version of the support libs & let us know the results.
If you are still able to reproduce this issue then provide the following info :
Provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory. Attach the bug report file to this issue.
Alternate method:
After reproducing the issue, navigate to developer settings, ensure ‘USB debugging’ is enabled, then enable ‘Bug report shortcut’. To take bug report, hold the power button and select the ‘Take bug report’ option.
NOTE: Please upload the files to Google Drive and share the folder to android-bugreport@google.com, then share the link here.
ca...@gmail.com <ca...@gmail.com> #4
I think this issue needs to be fixed as a first priority. You can reproduce the error with opening app and calling biometricPrompt.authenticate() after that press home button and then, show your finger to sensor. It'll crash instantly. You can reproduce the issue easily. I can do that with my Oreo device. I think that cancelAuthenticate doesn't work properly.
cu...@google.com <cu...@google.com>
ap...@google.com <ap...@google.com> #5
This issue looks like fixed with library -- androidx.biometric:biometric:1.0.0-alpha03
Q) Once user tries for 5 times, the popUp will not be visible for next 30 seconds. It is taking too much time to give errorCode=7 (ERROR_LOCKOUT) when tries to see the biometric popup again. Is there a way to see the errorCode faster than usual?
Thanks,
Q) Once user tries for 5 times, the popUp will not be visible for next 30 seconds. It is taking too much time to give errorCode=7 (ERROR_LOCKOUT) when tries to see the biometric popup again. Is there a way to see the errorCode faster than usual?
Thanks,
cu...@google.com <cu...@google.com>
di...@gmail.com <di...@gmail.com> #6
I'm using alpha03 as well but the bug still remains. I'm facing it right now. You can check the problem when you open dialogfragment via authenticate() and press home button and then showing your finger to sensor.
ja...@sharesies.co.nz <ja...@sharesies.co.nz> #7
I'll attach a crash log to this, we're getting dozens of crashes per day, over 3% of our user sessions. Will try alpha03, and some of the reproduction notes here.
te...@gmail.com <te...@gmail.com> #8
Here's a recent crashlytics bug report on this, with alpha02.
Description
Biometric library version:
1.1.0-alpha01
This bug was reported in Mozilla Fenix, but it's actually a leak in BiometricViewModel.
Mozilla Fenix bug report:https://github.com/mozilla-mobile/fenix/issues/13477
To reproduce, follow the official Android X sample code and add the sample code to a fragment. Display the login prompt, get the fragment destroyed, the fragment is now leaking
As soon as the fragment is destroyed, the leak triggers as the fragment cannot be garbage collected because the AuthenticationCallback implementation is retained.
Looking at the Android X sources , the callback is set in
BiometricPrompt
BiometricPrompt.init()
which is called from theBiometricPrompt
constructor and never unset.So, as it stands, there is no way to clear the callback, and
BiometricViewModel
is always created with an activity lifecycle, so the callback always has the lifecycle of the activity. This means that currently the library will leak any fragment it's used from.