Skip to content

App crashes when toggle biometric authentication #5169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
nitzcard opened this issue May 11, 2025 · 5 comments
Open
1 task done

App crashes when toggle biometric authentication #5169

nitzcard opened this issue May 11, 2025 · 5 comments

Comments

@nitzcard
Copy link

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.
@S-Kakar
Copy link

S-Kakar commented May 11, 2025

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

@rmcdowell-bitwarden
Copy link
Collaborator

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!

@AdityaAparadh
Copy link

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

@amibumping
Copy link

amibumping commented 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.

@AdityaAparadh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants