App crashing after a restart. #2097

Closed
opened 2025-11-26 23:08:03 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @PRinceBhai on GitHub (Dec 8, 2024).

Steps To Reproduce

Just open the app.

Expected Result

The app to open and work.

Actual Result

App crashes with FATAL EXCEPTION

Screenshots or Videos

No response

Additional Context

Crash Log via LogFox :

FATAL EXCEPTION: main
Process: com.x8bit.bitwarden, PID: 17397
java.lang.RuntimeException: Unable to create application com.x8bit.bitwarden.BitwardenApplication: java.security.KeyStoreException: the master key android-keystore://_androidx_security_master_key_ exists but is unusable
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6485)
	at android.app.ActivityThread.access$1300(ActivityThread.java:220)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7398)
	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:925)
Caused by: java.security.KeyStoreException: the master key android-keystore://_androidx_security_master_key_ exists but is unusable
	at J3.a.h(Unknown Source:48)
	at J3.a.a(Unknown Source:34)
	at f8.n.B(Unknown Source:287)
	at f6.a.e(Unknown Source:87)
	at s4.v.get(Unknown Source:4207)
	at O9.a.get(Unknown Source:13)
	at s4.v.get(Unknown Source:4215)
	at O9.a.get(Unknown Source:13)
	at s4.v.get(Unknown Source:4304)
	at O9.a.get(Unknown Source:13)
	at s4.v.get(Unknown Source:4390)
	at O9.a.get(Unknown Source:13)
	at s4.v.get(Unknown Source:4405)
	at O9.a.get(Unknown Source:13)
	at com.x8bit.bitwarden.BitwardenApplication.onCreate(Unknown Source:19)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6480)
	... 8 more
Caused by: android.security.keystore.KeyNotYetValidException: Key not yet valid
	at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1320)
	at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1413)
	at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
	at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
	at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
	at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
	at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
	at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
	at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
	at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
	at javax.crypto.Cipher.init(Cipher.java:1143)
	at javax.crypto.Cipher.init(Cipher.java:1084)
	at J3.c.d(Unknown Source:20)
	at J3.c.a(Unknown Source:25)
	at J3.d.c(Unknown Source:21)
	at J3.a.h(Unknown Source:22)
	... 24 more

Build Version

2024.11.3

What server are you connecting to?

US

Self-host Server Version

No response

Environment Details

Device: Xioami Redmi Note 3
Android Version: 10
Skin/OS: Colt OS

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 @PRinceBhai on GitHub (Dec 8, 2024). ### Steps To Reproduce Just open the app. ### Expected Result The app to open and work. ### Actual Result App crashes with FATAL EXCEPTION ### Screenshots or Videos _No response_ ### Additional Context Crash Log via LogFox : ``` FATAL EXCEPTION: main Process: com.x8bit.bitwarden, PID: 17397 java.lang.RuntimeException: Unable to create application com.x8bit.bitwarden.BitwardenApplication: java.security.KeyStoreException: the master key android-keystore://_androidx_security_master_key_ exists but is unusable at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6485) at android.app.ActivityThread.access$1300(ActivityThread.java:220) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7398) 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:925) Caused by: java.security.KeyStoreException: the master key android-keystore://_androidx_security_master_key_ exists but is unusable at J3.a.h(Unknown Source:48) at J3.a.a(Unknown Source:34) at f8.n.B(Unknown Source:287) at f6.a.e(Unknown Source:87) at s4.v.get(Unknown Source:4207) at O9.a.get(Unknown Source:13) at s4.v.get(Unknown Source:4215) at O9.a.get(Unknown Source:13) at s4.v.get(Unknown Source:4304) at O9.a.get(Unknown Source:13) at s4.v.get(Unknown Source:4390) at O9.a.get(Unknown Source:13) at s4.v.get(Unknown Source:4405) at O9.a.get(Unknown Source:13) at com.x8bit.bitwarden.BitwardenApplication.onCreate(Unknown Source:19) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6480) ... 8 more Caused by: android.security.keystore.KeyNotYetValidException: Key not yet valid at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1320) at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1413) at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54) at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89) at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109) at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984) at javax.crypto.Cipher.tryCombinations(Cipher.java:2891) at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796) at javax.crypto.Cipher.chooseProvider(Cipher.java:773) at javax.crypto.Cipher.init(Cipher.java:1143) at javax.crypto.Cipher.init(Cipher.java:1084) at J3.c.d(Unknown Source:20) at J3.c.a(Unknown Source:25) at J3.d.c(Unknown Source:21) at J3.a.h(Unknown Source:22) ... 24 more ``` ### Build Version 2024.11.3 ### What server are you connecting to? US ### Self-host Server Version _No response_ ### Environment Details Device: Xioami Redmi Note 3 Android Version: 10 Skin/OS: Colt OS ### 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 app:password-managerbug labels 2025-11-26 23:08:03 -06:00
Author
Owner

@bitwarden-bot commented on GitHub (Dec 8, 2024):

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

@bitwarden-bot commented on GitHub (Dec 8, 2024): Thank you for your report! We've added this to our internal board for review. ID: PM-15652
Author
Owner

@Greenderella commented on GitHub (Dec 12, 2024):

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!

@Greenderella commented on GitHub (Dec 12, 2024): 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

@PRinceBhai commented on GitHub (Dec 12, 2024):

Hi..

Hi Greenderella, unfortunately that's all the information I had. The version I was using was the FDroid (I apologize for that I forgot to mention it) after the app started crashing I cleared it's app data and tried logging in again but after some time it did the same. So for now I'm using the Play Store version. And I've just logged in about 3 hours ago and so far it's been work fine. I'll add more information if anything comes up.

Thank you.

@PRinceBhai commented on GitHub (Dec 12, 2024): > Hi.. Hi Greenderella, unfortunately that's all the information I had. The version I was using was the FDroid (I apologize for that I forgot to mention it) after the app started crashing I cleared it's app data and tried logging in again but after some time it did the same. So for now I'm using the Play Store version. And I've just logged in about 3 hours ago and so far it's been work fine. I'll add more information if anything comes up. Thank you.
Author
Owner

@PRinceBhai commented on GitHub (Dec 13, 2024):

The play store version is now also crashing now upon just opening to login :(

FATAL EXCEPTION: main Process: com.x8bit.bitwarden, PID: 16719 java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) ... 1 more Caused by: android.security.keystore.KeyNotYetValidException: Key not yet valid at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1320) at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1413) at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54) at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89) at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:148) at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2980) at javax.crypto.Cipher.tryCombinations(Cipher.java:2891) at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796) at javax.crypto.Cipher.chooseProvider(Cipher.java:773) at javax.crypto.Cipher.init(Cipher.java:1288) at javax.crypto.Cipher.init(Cipher.java:1223)

@PRinceBhai commented on GitHub (Dec 13, 2024): The play store version is now also crashing now upon just opening to login :( `FATAL EXCEPTION: main Process: com.x8bit.bitwarden, PID: 16719 java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) ... 1 more Caused by: android.security.keystore.KeyNotYetValidException: Key not yet valid at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1320) at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1413) at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54) at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89) at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:148) at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2980) at javax.crypto.Cipher.tryCombinations(Cipher.java:2891) at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796) at javax.crypto.Cipher.chooseProvider(Cipher.java:773) at javax.crypto.Cipher.init(Cipher.java:1288) at javax.crypto.Cipher.init(Cipher.java:1223)`
Author
Owner

@PRinceBhai commented on GitHub (Jan 9, 2025):

So I decided to give a try again yesterday. And I seem to have found out why the app starts crashing. It's because I use biometrics lockout. If I disable the app no longer crashes. The crash can only be remedied by clearing the app data. I have only yet tried the FDroid variant.

Also the lockout seems to be permanently triggered even though I've set it to 15 minutes, so I have to constantly log in with my master password everytime signing into any site. This was the case before though.

Edit: Nope it seems to just start crashing after a restart even with a biometric setup for some reason. 😭

@PRinceBhai commented on GitHub (Jan 9, 2025): So I decided to give a try again yesterday. And I seem to have found out why the app starts crashing. It's because I use biometrics lockout. If I disable the app no longer crashes. The crash can only be remedied by clearing the app data. I have only yet tried the FDroid variant. Also the lockout seems to be permanently triggered even though I've set it to 15 minutes, so I have to constantly log in with my master password everytime signing into any site. This was the case before though. Edit: Nope it seems to just start crashing after a restart even with a biometric setup for some reason. 😭
Author
Owner

@PRinceBhai commented on GitHub (Apr 3, 2025):

This I believe was solved in recent updates, I haven't experienced this issue again. Thanks, marking this as closed. 👍

@PRinceBhai commented on GitHub (Apr 3, 2025): This I believe was solved in recent updates, I haven't experienced this issue again. Thanks, marking this as closed. 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2097