[GH-ISSUE #5169] App crashes when toggle biometric authentication #115971

Open
opened 2026-06-09 09:18:32 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @nitzcard on GitHub (May 11, 2025).
Original GitHub issue: https://github.com/bitwarden/android/issues/5169

Steps To Reproduce

  1. Go to settings.
  2. Click on "account security"
  3. Toggle "unlock with biometrics"
  4. Bitwarden will crash and result won't be saved.

Expected Result

Setting should be saved.

Actual Result

App crashes, setting is not saved.

Screenshots or Videos

No response

Additional Context

I have logcat for you.

file.txt

Build Version

2025.4.0 (20100)

What server are you connecting to?

US

Self-host Server Version

No response

Environment Details

  • Poco F6
  • Derpfest ROm.

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
Originally created by @nitzcard on GitHub (May 11, 2025). Original GitHub issue: https://github.com/bitwarden/android/issues/5169 ### Steps To Reproduce 1. Go to settings. 2. Click on "account security" 3. Toggle "unlock with biometrics" 4. Bitwarden will crash and result won't be saved. ### Expected Result Setting should be saved. ### Actual Result App crashes, setting is not saved. ### Screenshots or Videos _No response_ ### Additional Context I have logcat for you. [file.txt](https://github.com/user-attachments/files/20151093/file.txt) ### Build Version 2025.4.0 (20100) ### What server are you connecting to? US ### Self-host Server Version _No response_ ### Environment Details - Poco F6 - Derpfest ROm. ### Issue Tracking Info - [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
GiteaMirror added the bugapp:password-manager labels 2026-06-09 09:18:32 -05:00
Author
Owner

@S-Kakar commented on GitHub (May 11, 2025):

Thank you for your report! We've added this to our internal board for review.
ID: PM-21484

<!-- gh-comment-id:2870070410 --> @S-Kakar commented on GitHub (May 11, 2025): Thank you for your report! We've added this to our internal board for review. ID: PM-21484
Author
Owner

@rmcdowell-bitwarden commented on GitHub (May 14, 2025):

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

<!-- gh-comment-id:2878219749 --> @rmcdowell-bitwarden commented on GitHub (May 14, 2025): Hi there, I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below. Thanks!
Author
Owner

@AdityaAparadh commented on GitHub (May 27, 2025):

Hey, I'm facing the exact same issue, on the same device i.e. Poco F6. It is running Android 15 (Crdroid 11.5).
Also I've tested multiple other applications that use Biometric Authentication, so it does not seem to be an issue with the ROM.

These are the crash logs I have:

time: 1748368948192
msg: android.security.KeyStoreException: Key user not authenticated (internal Keystore code: -26 message: system/security/keystore2/src/operation.rs:835: KeystoreOperation::update

Caused by:
    0: system/security/keystore2/src/operation.rs:392: Update failed.
    1: Error::Km(r#KEY_USER_NOT_AUTHENTICATED))
stacktrace: javax.crypto.IllegalBlockSizeException
	at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:634)
	at javax.crypto.Cipher.doFinal(Cipher.java:2074)
	at H7.x.v(Unknown Source:111)
	at ia.g0.invokeSuspend(Unknown Source:43)
	at mc.a.resumeWith(Unknown Source:7)
	at Kc.L.run(Unknown Source:114)
	at Kc.Y.v0(Unknown Source:23)
	at Kc.l.p(Unknown Source:92)
	at Kc.l.k(Unknown Source:2)
	at Mc.j.a(Unknown Source:6)
	at Mc.h.G(Unknown Source:69)
	at Mc.h.h(Unknown Source:55)
	at Mc.h.f(Unknown Source:96)
	at c9.c.i(Unknown Source:2)
	at ia.W.invoke(Unknown Source:118)
	at R9.j.invoke(Unknown Source:56)
	at Ja.b.invoke(Unknown Source:31)
	at Ja.c.w(Unknown Source:17)
	at h3.d.run(Unknown Source:317)
	at android.os.Handler.handleCallback(Handler.java:991)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8935)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [v0{Cancelling}@63eab42, Dispatchers.Main.immediate]
Caused by: android.security.KeyStoreException: Key user not authenticated (internal Keystore code: -26 message: system/security/keystore2/src/operation.rs:835: KeystoreOperation::update

Caused by:
    0: system/security/keystore2/src/operation.rs:392: Update failed.
    1: Error::Km(r#KEY_USER_NOT_AUTHENTICATED)) (public error code: 2 internal Keystore code: -26)
	at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:428)
	at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:79)
	at android.security.KeyStoreOperation.update(KeyStoreOperation.java:118)
	at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.update(KeyStoreCryptoOperationChunkedStreamer.java:222)
	at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunkedStreamer.java:156)
	at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:179)
	at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:624)
	... 26 more
<!-- gh-comment-id:2913495342 --> @AdityaAparadh commented on GitHub (May 27, 2025): Hey, I'm facing the exact same issue, on the same device i.e. Poco F6. It is running Android 15 (Crdroid 11.5). Also I've tested multiple other applications that use Biometric Authentication, so it does not seem to be an issue with the ROM. These are the crash logs I have: ``` time: 1748368948192 msg: android.security.KeyStoreException: Key user not authenticated (internal Keystore code: -26 message: system/security/keystore2/src/operation.rs:835: KeystoreOperation::update Caused by: 0: system/security/keystore2/src/operation.rs:392: Update failed. 1: Error::Km(r#KEY_USER_NOT_AUTHENTICATED)) stacktrace: javax.crypto.IllegalBlockSizeException at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:634) at javax.crypto.Cipher.doFinal(Cipher.java:2074) at H7.x.v(Unknown Source:111) at ia.g0.invokeSuspend(Unknown Source:43) at mc.a.resumeWith(Unknown Source:7) at Kc.L.run(Unknown Source:114) at Kc.Y.v0(Unknown Source:23) at Kc.l.p(Unknown Source:92) at Kc.l.k(Unknown Source:2) at Mc.j.a(Unknown Source:6) at Mc.h.G(Unknown Source:69) at Mc.h.h(Unknown Source:55) at Mc.h.f(Unknown Source:96) at c9.c.i(Unknown Source:2) at ia.W.invoke(Unknown Source:118) at R9.j.invoke(Unknown Source:56) at Ja.b.invoke(Unknown Source:31) at Ja.c.w(Unknown Source:17) at h3.d.run(Unknown Source:317) at android.os.Handler.handleCallback(Handler.java:991) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.app.ActivityThread.main(ActivityThread.java:8935) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [v0{Cancelling}@63eab42, Dispatchers.Main.immediate] Caused by: android.security.KeyStoreException: Key user not authenticated (internal Keystore code: -26 message: system/security/keystore2/src/operation.rs:835: KeystoreOperation::update Caused by: 0: system/security/keystore2/src/operation.rs:392: Update failed. 1: Error::Km(r#KEY_USER_NOT_AUTHENTICATED)) (public error code: 2 internal Keystore code: -26) at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:428) at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:79) at android.security.KeyStoreOperation.update(KeyStoreOperation.java:118) at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.update(KeyStoreCryptoOperationChunkedStreamer.java:222) at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunkedStreamer.java:156) at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:179) at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:624) ... 26 more ```
Author
Owner

@amibumping commented on GitHub (May 29, 2025):

Same error on PocoF6 on Derpfest rom:

Log:
https://bin.mkr.pw/~683743e4632ce757b626ae18

EDIT: It seems at least for me, that deleting fingerprints, and recreate them works.

<!-- gh-comment-id:2918618637 --> @amibumping commented on GitHub (May 29, 2025): Same error on PocoF6 on Derpfest rom: Log: https://bin.mkr.pw/~683743e4632ce757b626ae18 EDIT: It seems at least for me, that deleting fingerprints, and recreate them works.
Author
Owner

@AdityaAparadh commented on GitHub (May 29, 2025):

Same error on PocoF6 on Derpfest rom:

Log:
https://bin.mkr.pw/~683743e4632ce757b626ae18

EDIT: It seems at least for me, that deleting fingerprints, and recreate them works.

Yep works on crdroid too. Thanks for the fix

<!-- gh-comment-id:2918689454 --> @AdityaAparadh commented on GitHub (May 29, 2025): > Same error on PocoF6 on Derpfest rom: > > Log: > https://bin.mkr.pw/~683743e4632ce757b626ae18 > > EDIT: It seems at least for me, that deleting fingerprints, and recreate them works. Yep works on crdroid too. Thanks for the fix
Author
Owner

@AdityaAparadh commented on GitHub (May 31, 2025):

Actually, the crash occurs when there are two or more fingerprints registered. It works fine with one.

<!-- gh-comment-id:2925167495 --> @AdityaAparadh commented on GitHub (May 31, 2025): Actually, the crash occurs when there are two or more fingerprints registered. It works fine with one.
Author
Owner

@tk-Ravi commented on GitHub (Jun 1, 2025):

I am having the same problem, the app crashes immediately when I enable biometric unlock in settings

<!-- gh-comment-id:2926539420 --> @tk-Ravi commented on GitHub (Jun 1, 2025): I am having the same problem, the app crashes immediately when I enable biometric unlock in settings
Author
Owner

@ndesgranges commented on GitHub (Jun 5, 2025):

Same issue, might be related to https://github.com/bitwarden/android/issues/4659

<!-- gh-comment-id:2943954185 --> @ndesgranges commented on GitHub (Jun 5, 2025): Same issue, might be related to https://github.com/bitwarden/android/issues/4659
Author
Owner

@tk-Ravi commented on GitHub (Jun 5, 2025):

Same error on PocoF6 on Derpfest rom:

Log: https://bin.mkr.pw/~683743e4632ce757b626ae18

EDIT: It seems at least for me, that deleting fingerprints, and recreate them works.

I deleted all the Biometrics and registered a new one and now it seems to work!

<!-- gh-comment-id:2944660856 --> @tk-Ravi commented on GitHub (Jun 5, 2025): > Same error on PocoF6 on Derpfest rom: > > Log: https://bin.mkr.pw/~683743e4632ce757b626ae18 > > EDIT: It seems at least for me, that deleting fingerprints, and recreate them works. I deleted all the Biometrics and registered a new one and now it seems to work!
Author
Owner

@ndesgranges commented on GitHub (Jun 7, 2025):

This workaround did not fix it for me

<!-- gh-comment-id:2952933458 --> @ndesgranges commented on GitHub (Jun 7, 2025): This workaround did not fix it for me
Author
Owner

@LuminaryWave commented on GitHub (Jun 9, 2025):

I have the same issue too and the workaround does not work. Deleted and recreated fingerprints, reinstalled Bitwarden even, but to no avail.

<!-- gh-comment-id:2955271816 --> @LuminaryWave commented on GitHub (Jun 9, 2025): I have the same issue too and the workaround does not work. Deleted and recreated fingerprints, reinstalled Bitwarden even, but to no avail.
Author
Owner

@ndesgranges commented on GitHub (Jun 30, 2025):

issue' still on 2025.6 0

<!-- gh-comment-id:3020265729 --> @ndesgranges commented on GitHub (Jun 30, 2025): issue' still on 2025.6 0
Author
Owner

@Quoteme commented on GitHub (Jul 20, 2025):

Same error on PocoF6 on Derpfest rom:

Log: https://bin.mkr.pw/~683743e4632ce757b626ae18

EDIT: It seems at least for me, that deleting fingerprints, and recreate them works.

This fixed the issue for me on Poco X6 Pro with an unofficial lineageos build

<!-- gh-comment-id:3094473008 --> @Quoteme commented on GitHub (Jul 20, 2025): > Same error on PocoF6 on Derpfest rom: > > Log: https://bin.mkr.pw/~683743e4632ce757b626ae18 > > EDIT: It seems at least for me, that deleting fingerprints, and recreate them works. This fixed the issue for me on Poco X6 Pro with an unofficial lineageos build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#115971