Android client crashing on Unlock (works in login) if using bitwarden_rs as server #809

Closed
opened 2026-02-04 22:46:29 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @callingshotgun on GitHub (Sep 24, 2020).

Describe the Bug

I'm connecting my Android client to a local network server with self-signed certs. Connecting by IP address or machine name, not FQDN. I can logout/login to the android app just fine, see my passwords, edit things, etc. But for some reason if I lock the app and then attempt to unlock it, I get a crash. Stack trace from ADB is:

2020-09-23 07:40:28.996 7611-7611/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.x8bit.bitwarden, PID: 7611
    android.runtime.JavaProxyThrowable: System.Exception: PBKDF2 iteration minimum is 5000.
      at Bit.Core.Services.CryptoService.MakeKeyAsync (System.String password, System.String salt, System.Nullable`1[T] kdf, System.Nullable`1[T] kdfIterations) [0x00087] in <9706884f9841497fa220cf8cf758b49b>:0 
      at Bit.App.Pages.LockPageViewModel.SubmitAsync () [0x0078a] in <27300ef8bf4f403aa2eec77652b94b93>:0 
      at Bit.App.Pages.LockPage.<Unlock_Clicked>b__17_1 () [0x00067] in <27300ef8bf4f403aa2eec77652b94b93>:0 
...

This only seems to happen if connecting to bitwarden_rs, not if connecting to official bitwarden server.
Also I've tried manually changing the value of the KDF iterations in case there was some "no default value" issue, but that didn't change anything. Unfortunately building hte mobile app requires visual studio and xamarin, which I don't have, so there's no way for me to build a version with better debugging output (like, say, the number of iterations it thinks the setting is)

Steps To Reproduce

  1. Environment: Bitwarden_RS server (not sure which server is relevant, but just in case) on local network. mkcert to create self-signed certs. No externally accessible domain name involved.

  2. Install Android client, log in to local bitwarden server

  3. Add some data, delete some data, sync, observe changes via web client if you want. Verify connection appears fine, user has logged in.

  4. Lock client

  5. Attempt to unlock client.

Expected Result

Unlocks app

Actual Result

Crashes app

Environment

Client:

  • Pixel 4 XL
  • Device: [e.g. iPhone6]
  • Operating system: Android 11
  • Build Version 2.6.0 (3162)]
  • Is this a Beta release? [N]

Additional Context

Server:

  • Bitwarden_RS on RPI4
  • using docker image bitwardenrs/server:raspberry
  • Host (RPI4) OS: Ubuntu 20.0.4

Misc:

*Also filed this issue in bitwarden mobile app repo, they suggested filing here if mobile app worked successfully against official bitwarden server. That ticket is here : https://github.com/bitwarden/mobile/issues/1087

Originally created by @callingshotgun on GitHub (Sep 24, 2020). ## Describe the Bug I'm connecting my Android client to a local network server with self-signed certs. Connecting by IP address or machine name, not FQDN. I can logout/login to the android app just fine, see my passwords, edit things, etc. But for some reason if I **lock** the app and then attempt to **unlock** it, I get a crash. Stack trace from ADB is: ``` 2020-09-23 07:40:28.996 7611-7611/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.x8bit.bitwarden, PID: 7611 android.runtime.JavaProxyThrowable: System.Exception: PBKDF2 iteration minimum is 5000. at Bit.Core.Services.CryptoService.MakeKeyAsync (System.String password, System.String salt, System.Nullable`1[T] kdf, System.Nullable`1[T] kdfIterations) [0x00087] in <9706884f9841497fa220cf8cf758b49b>:0 at Bit.App.Pages.LockPageViewModel.SubmitAsync () [0x0078a] in <27300ef8bf4f403aa2eec77652b94b93>:0 at Bit.App.Pages.LockPage.<Unlock_Clicked>b__17_1 () [0x00067] in <27300ef8bf4f403aa2eec77652b94b93>:0 ... ``` This only seems to happen if connecting to bitwarden_rs, not if connecting to official bitwarden server. Also I've tried manually changing the value of the KDF iterations in case there was some "no default value" issue, but that didn't change anything. Unfortunately building hte mobile app requires visual studio and xamarin, which I don't have, so there's no way for me to build a version with better debugging output (like, say, the number of iterations it thinks the setting is) ## Steps To Reproduce 1) Environment: Bitwarden_RS server (not sure which server is relevant, but just in case) on local network. mkcert to create self-signed certs. No externally accessible domain name involved. 2) Install Android client, log in to local bitwarden server 3) Add some data, delete some data, sync, observe changes via web client if you want. Verify connection appears fine, user has logged in. 4) Lock client 5) Attempt to unlock client. ## Expected Result Unlocks app ## Actual Result Crashes app ## Environment Client: - Pixel 4 XL - Device: [e.g. iPhone6] - Operating system: Android 11 - Build Version 2.6.0 (3162)] - Is this a Beta release? [N] ## Additional Context Server: - Bitwarden_RS on RPI4 - using docker image bitwardenrs/server:raspberry - Host (RPI4) OS: Ubuntu 20.0.4 Misc: - Accessed by IP/port (https://192.168.1.123:8005) or machine name (https://mypi:8005) , identical results - certificates made with mkcert *Also filed this issue in bitwarden mobile app repo, they suggested filing here if mobile app worked successfully against official bitwarden server. That ticket is here : https://github.com/bitwarden/mobile/issues/1087
Author
Owner

@jjlin commented on GitHub (Sep 24, 2020):

You shouldn't be using the raspberry tag anymore, see https://github.com/dani-garcia/bitwarden_rs/wiki/Which-container-image-to-use

@jjlin commented on GitHub (Sep 24, 2020): You shouldn't be using the `raspberry` tag anymore, see https://github.com/dani-garcia/bitwarden_rs/wiki/Which-container-image-to-use
Author
Owner

@callingshotgun commented on GitHub (Sep 24, 2020):

@jjlin Thank you so much! That turned out to be the issue. I must have followed a slightly stale tutorial in setting everything up.

Closing the bug.

@callingshotgun commented on GitHub (Sep 24, 2020): @jjlin Thank you so much! That turned out to be the issue. I must have followed a slightly stale tutorial in setting everything up. Closing the bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#809