Bitwarden crashing on biometric unlock
- Dominant language
- Kotlin
- Stars
- 9.4k
- Forks
- 1.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 67
Description
### Steps To Reproduce
1. Open Bitwarden and log in with your account.
2. Enable biometric unlock.
3. Exit Bitwarden and open the app again.
4. Try to unlock the app using biometrics
### Expected Result
My vault should unlock.
### Actual Result
The app is crashing.
### Screenshots or Videos
_No response_
### Additional Context
Might be similar to [4651](https://github.com/bitwarden/android/issues/4651) & [4650](https://github.com/bitwarden/android/issues/4650) perhaps?
Anyway, here's a logcat I captured about the crash as well:
`FATAL EXCEPTION: main
Process: com.x8bit.bitwarden, PID: 20692
javax.crypto.BadPaddingException
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:630)
at javax.crypto.Cipher.doFinal(Cipher.java:2074)
at a8.A0.R(Unknown Source:113)
at J8.O.invokeSuspend(Unknown Source:43)
at Jb.a.resumeWith(Unknown Source:7)
at ec.K.run(Unknown Source:109)
at ec.X.d0(Unknown Source:23)
at ec.l.o(Unknown Source:80)
at ec.l.s(Unknown Source:2)
at gc.l.a(Unknown Source:6)
at gc.j.I(Unknown Source:84)
at gc.j.g(Unknown Source:56)
at gc.j.p(Unknown Source:107)
at Q8.d.i(Unknown Source:2)
at J8.x.invoke(Unknown Source:116)
at S8.d.invoke(Unknown Source:11)
at ma.b.F(Unknown Source:15)
at c.o.run(Unknown Source:246)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:282)
at android.os.Looper.loop(Looper.java:387)
at android.app.ActivityThread.main(ActivityThread.java:9505)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1005)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [t0{Cancelling}@9b8c38, Dispatchers.Main.immediate]
Caused by: android.security.KeyStoreException: Invalid argument (internal Keystore code: -38 message: system/security/keystore2/src/operation.rs:847: KeystoreOperation::finish
Caused by:
0: system/security/keystore2/src/operation.rs:428: Finish failed.
1: Error::Km(r#INVALID_ARGUMENT)) (public error code: 10 internal Keystore code: -38)
at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:416)
at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:79)
at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:132)
at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228)
at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181)
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:624)
... 25 more`
### Build Version
2025.1.1 (Play Store)
### What server are you connecting to?
US
### Self-host Server Version
_No response_
### Environment Details
- Device: OnePlus 11
- Android version: 15
- OxygenOS Version: CPH2447_15.0.0.401(EX01V30P01)
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.