Skip to content
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

Bitwarden native mobile clients fail sync with invalid ssh-key entries #5343

Closed
hegedussz opened this issue Jan 3, 2025 · 10 comments · Fixed by #5339
Closed

Bitwarden native mobile clients fail sync with invalid ssh-key entries #5343

hegedussz opened this issue Jan 3, 2025 · 10 comments · Fixed by #5339
Labels
bug Something isn't working

Comments

@hegedussz
Copy link

hegedussz commented Jan 3, 2025

Vaultwarden Support String

Your environment (Generated via diagnostics page)

  • Vaultwarden version: v1.32.7
  • Web-vault version: v2024.6.2c
  • OS/Arch: linux/x86_64
  • Running within a container: true (Base: Debian)
  • Database type: SQLite
  • Database version: 3.46.0
  • Environment settings overridden!: true
  • Uses a reverse proxy: true
  • IP Header check: true (X-Real-IP)
  • Internet access: true
  • Internet access via a proxy: false
  • DNS Check: true
  • Browser/Server Time Check: true
  • Server/NTP Time Check: true
  • Domain Configuration Check: true
  • HTTPS Check: true
  • Websocket Check: true
  • HTTP Response Checks: true

Vaultwarden Build Version

1.32.7

Deployment method

Official Container Image

Custom deployment method

No response

Reverse Proxy

nginx

Host/Server Operating System

Linux

Operating System Version

Ubuntu 22.04

Clients

iOS

Client Version

2024.12.0 (1740)

Steps To Reproduce

  1. Upgrade Vaultwarden
  2. Setting a variables
  • name: EXPERIMENTAL_CLIENT_FEATURE_FLAGS
    value: ssh-key-vault-item,ssh-agent
  1. Login to Bitwarden client
  2. Bitwarden sync vault

Later deleted the variables

Expected Result

The synchronisation was successful

Actual Result

Synchronisation does not work, vault not updated, not loading

Logs

No response

Screenshots or Videos

IMG_2222

Additional Context

No response

@hegedussz hegedussz added the bug Something isn't working label Jan 3, 2025
@BlackDex
Copy link
Collaborator

BlackDex commented Jan 3, 2025

If there are any invalid ssh-key entries this will happen.
Check your ssh-key entries if delete the invalid items, also from you trash.

@tomitomas
Copy link

tomitomas commented Jan 3, 2025

same here on android app --> Version: 2024.12.0 (19597)

Screenshot_20250104_002506_Bitwarden.jpg

everything's OK with the desktop app, from where I've added the ssh keys.

edit : will have a look at #5322, tomorrow !

@BlackDex
Copy link
Collaborator

BlackDex commented Jan 3, 2025

The mobile clients are more strict.
So it's there is any ssh key which is not valid, this will cause that error.

@tomitomas
Copy link

tomitomas commented Jan 3, 2025

yep, saw your previous answer ;)
i was just saying its not only ios, but can also happen with android

from my Phone, on the web version I'm not able to see any of the ssh key, and the trash is also empty ... weird

will check tomorrow if I'm able to see anything from desktop app.
--> for sur I made some test with only the name on an ssh key item, see my previous "issue" ... so there might be some in the trash at least (which I see now empty !)

@BlackDex
Copy link
Collaborator

BlackDex commented Jan 3, 2025

The web-vault doesn't support this (yet), so that isn't strange.

@Gerardv514
Copy link

Gerardv514 commented Jan 4, 2025

If this is happening on both iOS & android, and is all related to ssh keys I’d suggest changing the title of this issue to reflect that. This helps keeps all previous issues of mobile clients not working separate, and specific to the actual issue.

@tomitomas
Copy link

--> for sur I made some test with only the name on an ssh key item, see my previous "issue" ... so there might be some in the trash at least (which I see now empty !)

so indeed I had 2 sshe key items only with a name in the trash, only viewable on the desktop client app
I removed them, and now I'm able to use again the mobile app

@BlackDex BlackDex changed the title Bitwarden iOS client not working Bitwarden native mobile clients fail sync with invalid ssh-key entries Jan 4, 2025
BlackDex added a commit to BlackDex/vaultwarden that referenced this issue Jan 4, 2025
If any of the mandatory ssh-key json data values are not a string or are an empty string, this will break the mobile clients.
This commit fixes this by checking if any of the values are missing or invalid and converts the json data to `null`.
It will ensure the clients can sync and show the vault.

Fixes dani-garcia#5343
Fixes dani-garcia#5322

Signed-off-by: BlackDex <[email protected]>
@BlackDex
Copy link
Collaborator

BlackDex commented Jan 4, 2025

I have created a fix for this. The only issue is that all the data of the key will be lost if just one of the mandatory fields is missing, as anything other than a valid encrypted string will still break the client. And we can't just replace it with something else.

@miberecz
Copy link

miberecz commented Jan 4, 2025

Let me hijack this thread a little bit.
I face again the issue that my Android Client cannot sync with my VW server. I tried to log-out and in again, and now I cannot even authenticate anymore against the server. Web client works, browser extensions, dekstop client also.
But I do not have any ssh keys stored, didnt even know thats possible until now.
Is there any other offending entry that I should remove/modify?

1.32.7 server image
2024.12.0 Android version

Couple weeks/month ago there were a similar occasion where it was solved by updating to latest server/client but that does not help now.

@BlackDex
Copy link
Collaborator

BlackDex commented Jan 4, 2025

Let me hijack this thread a little bit. I face again the issue that my Android Client cannot sync with my VW server. I tried to log-out and in again, and now I cannot even authenticate anymore against the server. Web client works, browser extensions, dekstop client also. But I do not have any ssh keys stored, didnt even know thats possible until now. Is there any other offending entry that I should remove/modify?

1.32.7 server image 2024.12.0 Android version

Couple weeks/month ago there were a similar occasion where it was solved by updating to latest server/client but that does not help now.

Start a new discussion, post your Support String (generate it via /admin/diagnostics), if possible, use adb logcat to see what the error is you get during login/sync.

dani-garcia pushed a commit that referenced this issue Jan 4, 2025
* Refactor the uri match change

Refactored the uri match fix to also convert numbers within a string to an int.
If it fails it will be null.

Signed-off-by: BlackDex <[email protected]>

* Fix ssh-key sync issues

If any of the mandatory ssh-key json data values are not a string or are an empty string, this will break the mobile clients.
This commit fixes this by checking if any of the values are missing or invalid and converts the json data to `null`.
It will ensure the clients can sync and show the vault.

Fixes #5343
Fixes #5322

Signed-off-by: BlackDex <[email protected]>

---------

Signed-off-by: BlackDex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants