mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #4719] When using vaultwarden version 1.31.0 and the beta version of bitwarden, synchronization fails. #1966
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1966
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wanlufun on GitHub (Jul 9, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4719
Subject of the issue
When I upgrade from an older version to the latest version of Vaultwarden, I can successfully log in to the user, but I cannot sync the password vault.
Deployment environment
Install method: Docker image
Clients used: Android Beta
Reverse proxy and version: nginx version: nginx/1.26.1
MySQL/MariaDB or PostgreSQL version: null
Other relevant details:
Steps to reproduce
Expected behaviour
Show my password vault.
Actual behaviour
In my password vault interface, it displays "We were unable to process your request. Please try again or contact us.".
However, when I create a new account and log in with the new account, it does not display "We were unable to process your request. Please try again or contact us." and I can normally create logins, sends, etc.
Troubleshooting data
@BlackDex commented on GitHub (Jul 9, 2024):
It's probably the same as reported here: https://github.com/dani-garcia/vaultwarden/pull/4386#issuecomment-2212324855
There probably is something inside your
datacolumn in thecipherstable which causes an issue.Since the new clients do not seem to report where it fails in a nice way it's hard to really pinpoint the specific problem it self.
For that we would need to see the output of the
syncrequest and try to find the possible issue.I'm not sure if you are willing to provide us some of these details? All data is encrypted.
@cobyge commented on GitHub (Jul 10, 2024):
I'm attaching a single object of the response from
/sync, (specifically a single object from thecipherslist.Hopefully this helps.
One thing I noticed is that the
urisfield on the official Bitwarden server looks like this:Whereas the response from my server looks like:
Output of a single object:
If any more data is needed, I'll be happy to share 😄
@BlackDex commented on GitHub (Jul 10, 2024):
There seems to be nothing wrong with this single cipher looking at it quickly.
@cobyge commented on GitHub (Jul 10, 2024):
Another thing:
In
collections, there is a field calledmanagethat I only see in Bitwarden but not in Vaultwarden:If that still isn't it, then let me know how I can contact you privately and send you a copy of my
/api/syncresults.@BlackDex commented on GitHub (Jul 10, 2024):
I do not have manage either, and that works fine.
It must be something in the ciphers, or maybe sends.
All other items are not dynamic or different between other servers.
@BlackDex commented on GitHub (Jul 10, 2024):
I did some more testing with adding the
"response"to a my test setup. But that doesn't seem to break it at all.So it must be something else, something not yet posted.
@cobyge commented on GitHub (Jul 10, 2024):
Managed to catch the bug:
@cobyge commented on GitHub (Jul 10, 2024):
For some reason I have two entries which contain:
"secureNote": {}@cobyge commented on GitHub (Jul 10, 2024):
Which is weird, as #4685 should have fixed this
@BlackDex commented on GitHub (Jul 10, 2024):
Well, not exactly.
Do you mean this part?
@BlackDex commented on GitHub (Jul 10, 2024):
Could you check your database for those ciphers and provide what is listed in the
datacolumn?@cobyge commented on GitHub (Jul 10, 2024):
There is an empty string for some reason.
That means that here
In that case self.data is an empty string instead of
{}I added
Above the previous line in order to verify the output, and there are 2 lines of:
I assume that is whats causing the issue, as earlier on in the code the default serialized value is set as
{}@cobyge commented on GitHub (Jul 10, 2024):
I can confirm that changing the code to:
(Adding
self.data.is_empty())fixes the issue
@BlackDex commented on GitHub (Jul 10, 2024):
Ah! Your's is empyt? That isn't something i encountered before.
@BlackDex commented on GitHub (Jul 10, 2024):
If you wan't you can make a PR for this.
@wanlufun commented on GitHub (Jul 11, 2024):
I'm sorry for not being able to assist in the past couple of days due to academic exams.
I see that this issue has been resolved, but I still cannot retrieve the sync data after repackaging the latest docker image.
So, I used a binary search method, deleting my password vault, and found a data item that was causing the import issue.
In this data item, I didn't fill in any notes, but the returned data still contained notes.
data item
@wanlufun commented on GitHub (Jul 11, 2024):
When I re-added and then deleted the notes for this data item, and then updated it, Bitwarden Android Beta worked normally. I don't quite remember how I saved this data item (browser extension, manual, keyguard). It seems that the issue might be with those methods (browser extension, manual, keyguard).
@BlackDex commented on GitHub (Jul 11, 2024):
Id you have a backup of your database before you made the changes, could you test it with the latest
testingtagged image and see if that solves it without any modifications on your side?@wanlufun commented on GitHub (Jul 11, 2024):
Oh, there is a testing image? That's great!
I restored the database backup and used the testing image. Without any modifications, the mobile client couldn't sync properly. Then I modified the notes for all data items through the web vault interface (which should be equivalent to resetting the validity of the notes data), and it returned to normal.
@BlackDex commented on GitHub (Jul 11, 2024):
I would love to know what the difference is before and after.
Could you provide this?
@wanlufun commented on GitHub (Jul 12, 2024):
yes, i can provide.
For example:
I found a problematic data item.
I checked this data item through the web vault, and in this data item, the notes field was empty.

However, when I checked the return value of the sync, the notes field in this data item had a value (which theoretically should be null).

Then, I added content to the empty notes field in the web vault and save (meaning I updated the notes field of this data item).

I checked the return value of /api/ciphers/, and at this point, the content of the notes field had changed.

Then, I logged in to the client, and it was able to sync normally.
I suspect that the notes in the original data item could not be decrypted properly, causing the client to fail to parse the data, which then led to the error. The cause of this issue might be some third-party software. Currently, I am using Keyguard, but I haven't tested it yet.
@wanlufun commented on GitHub (Jul 12, 2024):
I think the official client seems to encounter an error when it cannot properly parse some data in a data item.
I believe it would be beneficial to submit an issue to the official client, suggesting that it should display the normal data items and ignore the abnormal ones while notifying the user. I wonder if the web vault should also handle it this way. I haven't seen any parse errors thrown in the console.
@BlackDex commented on GitHub (Jul 12, 2024):
@wanlufun, i noticed that in the screenshot where you say it fails, it is still using PascalCase key names, like
Notes, and in the screenshot you show where it is working, it is using camelCase, likenotes.The latter is the version which should be working on the new beta clients, since those clients to do not understand
Notes, but onlynotes. But this is the same for all other items btw, which also show capital case first letters.Are you sure you used the v1.31.0 (or the latest testing version) during that test?
@wanlufun commented on GitHub (Jul 12, 2024):
@BlackDex, Due to my oversight, I compared two versions and posted the wrong image. In the above response, the two images are from different versions.
Here is the correct image for Chapter One.
@BlackDex commented on GitHub (Jul 12, 2024):
Strange indeed. I do not see anything strange here. And since you can resolve it by hosting the cipher, and the layout/keys are not different, i think it's not something we can fix on our side.
In that case, I'm going to close this again.
@a15355447898a commented on GitHub (Nov 21, 2024):
I have the same issue. I'm using the vaultwarden 1.32.5 docker image.
My Bitwarden desktop clients on Windows and Linux, as well as the beta version of the browser extension, work fine.
However, on my Android phone, the Bitwarden beta version 2024.11.5 (19461) (latest version) displays "We were unable to process your request. Please try again or contact us."
On the same phone, the third-party client "keyguard" works normally.
I am not very skilled in programming-related techniques. Can you tell me how to troubleshoot this issue? I'd be happy to provide any related error logs.
When clicking sync on the problematic Bitwarden client, the vaultwarden logs are as follows:
I don't know how to view the error logs of the Android client; I'm sorry I can't provide them.
@wanlufun commented on GitHub (Nov 21, 2024):
@a15355447898a
You can try accessing the Vaultwarden web interface and editing the notes field for all your items, regardless of whether they currently contain any content. After making these changes, try logging into the beta version of the Bitwarden app on your phone and testing it again. During this process, avoid using the Keyguard client to ensure accurate results.
Let me know if this helps resolve the issue!
@a15355447898a commented on GitHub (Nov 21, 2024):
I have over 700 items in my Vaultwarden library, and it's impractical to modify them one by one. I tried the following methods:
notesfields looked like this:"notes": "",when they should normally be"notes": null,"notes": null,and"notes": "xxxxx",I don't know which step was effective, but it seems there are some issues with the Vaultwarden on the first computer.
@wanlufun commented on GitHub (Nov 21, 2024):
@a15355447898a
Hello, you might want to try exporting the data from the Vaultwarden instance created in step 4 and then compare it with the content of your original export from step 1.
This comparison could help identify any differences or issues with the original Vaultwarden instance. Let me know if you need assistance with this process!
@BlackDex commented on GitHub (Nov 21, 2024):
Are you 100% sure you are using the latest version?
You can also try to do a password change including key-rotation.
That might help as well without too much hassle.
@a15355447898a commented on GitHub (Nov 21, 2024):
I compared them, and aside from the difference between "notes": "" and "notes": null, some ID and timestamp discrepancies, the only difference is the presence of trailing empty lines in some notes.
Modifying these trailing empty lines didn't help.
@a15355447898a commented on GitHub (Nov 21, 2024):
I'm 100% certain I'm using the latest image, the
org.opencontainers.image.versiontag in the image is1.32.5, the latest version. Re-pulling the image withdocker pulldidn't result in any changes.The password change, including key rotation, worked for me. Thanks a lot!