Bitwarden_rs: Import does not display the imported ciphers until you log out and back in again.

Created on 6 Aug 2018  ·  10Comments  ·  Source: dani-garcia/bitwarden_rs

1) I reset my v2 beta, so it was a clean install.
2) Exported all data from my working v1 install using bitwarden export.
3) Imported the export file into v2 instance and green 'success' notification appeared.
4) No data appears in the v2 instance?

No errors in the log either....

Edit: It appears I have to logout of the v2 instance and log back in again for anything to appear.

Is this normal, or should a refresh be pushed after the import?

Thanks.

bug future Vault

All 10 comments

I think just reloading the page should do the trick.

As for why this happens, it's quite possible we just need to push some cipher info back in response, will have to test that with the official server

Reloading the page didn't work for me.

I had to fully logout and back in again for it to refresh.

What version of Vault are you using?

Both updated this morning.

Can you check the exact Vault version number?

Where? v1.27.0 and v2.0.0, but they have always said that.

Okay, I've been looking into that and I think I understand where is the issue. The client will POST the data to /api/ciphers/import. Then it will call GET on /api/accounts/revision-date. This should return timestamp of when was the account last updated. It should receive some recent timestamp and realize it did sync before that and that there are some updates pending and it should do the sync.

Now there are couple issues in bitwarden_rs preventing that. One is that the revision date endpoint should return unix time in miliseconds and not seconds, client (thinking that it's in ms) then assumes that last update was done sometimes in 1970. 👴 ⏲ 😄 Hence it doesn't even try to sync as it thinks it already has newer data. (reported #127 for that)

Besides the above issue, we need to update revision date when we do the import. (this is why logging off helps you, it updates the account revision date) I've did a quick and dirty hack to test this and indeed the ciphers are loaded right after the import is done.

Thanks for the investigation, seems to make sense.

This should be fixed now that #131 is merged

Note, that docker image is still being built, so give it about 2 hours before testing the beta image.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SpinB picture SpinB  ·  3Comments

djmattyg007 picture djmattyg007  ·  5Comments

linuxbandit picture linuxbandit  ·  5Comments

newkind picture newkind  ·  4Comments

Jungack picture Jungack  ·  3Comments