Clearer error message when vault is out of sync

Feature name

  • Clearer error message when vault is out of sync

Feature function

  • What will this feature do differently?
    • Make an error message easier to understand
  • What benefits will this feature bring?
    • Less confusion
  • Remember to add a tag for each client application that will be affected
    • I did not test all platforms, only noticed on Firefox addon

Related topics + references

NA

Body

I just got this error and took me a bit to figure out what was going on

The cipher you are updating is out of date. Please save your work, sync your vault, and try again.

I would think something more like “Your vault is out of sync” instead of “The cipher you are updating is out of date”.

I don’t know about how current things are implemented, but a random thought how one might do something like this if the issue is related to encryption is to have an unencrypted vault “version” that is just a guid and the client can check to see if the last known guid is a different than the online version and know if the current vault is out of sync.

I am also getting that error sometimes, but I could not figure out what it means or how to reproduce it.
Screen Shot 2021-08-01 at 18.44.33

You can reproduce it like this:
Edit an item inside Bitwarden (app/extension/web).
Edit the same item inside another instance of Bitwarden.
Try to save both of them.

This should read “The item you are updating…” - the term ‘cipher’ is just what we refer to items as in the coee. CC @Hinton

I receive that error for all passwords on my mobile client. What do I need to do? Logout and login again?

Hi @dreamflasher, can you try this advice from Github? Try logging out any active sessions and rebooting your devices.

This happens when the client you’re using finds a more up-to-date version of that same vault item in your cloud vault. Please log out of your browser extension, reboot your machine, log back into your browser extension, and let me know if you continue to encounter this.
Also, please make sure you do not have any of those vault items open in Edit-mode in any other Bitwarden client, just to be on the safe side.

Just came across this error too - I guess it makes it easier to search but a lot of non-technical users will be a bit scared by the mention of a cipher and I’d be supportive of updating it to the suggested version above. It’s also misleading as you can’t save your work if hit by this error!

If anybody wants to do a pull request, the message is hardcoded in the file server/src/Core/Vault/Services/Implementations/CipherService.cs:

Thanks @grb - done at [PM-5625] Update vault out of sync error message in CipherService.cs by EDIflyer ¡ Pull Request #3652 ¡ bitwarden/server ¡ GitHub

Great! However, I think it may be best to take a more conservative approach to the revision of the message wording.

The original was:

"The cipher you are updating is out of date. Please save your work, sync your vault, and try again."

Your PR proposes:

"Your vault is out of sync & changes could not be saved. Please logout & back in to your vault and try again."

The error message seems to be thrown specifically when there is more than a 1-second discrepancy in the revision time of a modified item. I haven’t dug sufficiently into the source code to know the exact meaning of the two timestamps that are being compared (cipher.RevisionDate vs. lastKnownRevisionDate.Value), but I believe that the main purpose of the error message is to deal with conflict situations that can occur when two client apps are simultaneously editing the same item — thus, if the first client app has saved its item after the second client app opened the item for editing, then the second client app is editing an outdated item (and therefore should not be able to save their changes, to prevent undoing the changes saved by the first client app).

Thus, I would suggest that you use wording to the following effect:

"The item you are updating is out of date. Please cancel your work, sync your vault, and try again."

Compared to the original wording, the only changes I’ve made are:

  • cipher → item (as recommended by @tgreer above).
  • save → cancel (to address the confusion that you’ve pointed out about being unable to save). I think the intent was to advise the user to save a copy of their edits somewhere outside Bitwarden, but it would take too much space to provide that advice in a way that is not misleading (and hopefully the user can come to this conclusion on their own when the instructions point out that the edits made in Bitwarden will be lost).

Thanks for the suggestion - I guess my only slight concern was that in my case this evening syncing the vault again kept failing too (until I checked the status page I actually thought there might be an issue with the Bitwarden server!) - the only solution was to log out and back in. Not sure how to best cover that scenario when such limited space for the message?

The best I can come up with that only involves minor changes is the following:

"The item you are updating is out of date. Please cancel your work and sync your vault or log out, then try again."

However, I think that the following alternative version may be the best. It is slightly longer than the others, but as seen in the screenshot above, there seems to be some extra room on the last line of the alert.

"The item cannot be saved because it is out of date. To edit this item, first sync your vault, or log out and back in."

1 Like

I like it, thanks! Have updated the PR with that.

1 Like

Cool, I just got this error to, I was totally confused, and a bit worried that my data could be corrupted. Thanks dev team!