[bug] ui: vault empty after login until refresh #3782
Subject of the issueImmediately after login in the UI, the vault appears to be completely empty. The vault entries populate correctly after a refresh and another login attempt. I'm able to reproduce this consistently. Some errors appear in the console (see screenshot). Deployment environment
Steps to reproduce
Expected behaviour
Actual behaviour
To fix:
Troubleshooting data |
Replies: 17 comments 35 replies
|
Your reverse proxy is replacing the Content Security Policy (CSP). Either something like ModSecurity or a WAF or something else adjusting them. Vaultwarden already sends the correct headers, and modifying them will break the web-vault and probably other clients. |
|
Curious that it tries to load |
|
I have been having this issue since a very long time as well. I am currently on vaultwarden 1.30.1 and vaultwarden-web 2023-12-0. I have noticed that if I login, then refresh and put the password in one more time, I can see all the items. Now if you either lock your vault or let it lock on it's own, but don't close the browser tab and open another tab and login to the vault, all the items show up on the first go without having to refresh. However, if no other previous tabs for the vault are open, then the first login shows 0 items until you refresh. @brandon1024 , would you please test this on your end to confirm? I do use HAProxy on my OpnSense firewall as a reverse proxy for vaultwarden. I have tried clearing the local cache for vaultwarden without luck. I have tried using Incognito/Private Windown & I have even tried downloading and using a completely different browser to no avail. A fix for this would really be appreciated. EDIT: My install is on an Archlinux LXC container on my Proxmox server using the packages from the Archlinux repos. I used to build my own until Archlinux started providing the vaultwarden packages in the official repos and then I switched to using the pre-built packages provided by my distro of choice. |
|
Curious if you see this happening after doing an update? I too have noticed this in the past, although it is very very rare. When I do notice it, it is usually after doing an update. I have seen this on browser extension and also web vault. To resolve I would hit log out, close the browser and then log back in (same for the browser extension) and all would be fine. I have never tried hitting the refresh button though, will try that next time I see it to determine if both experiences are related. |
|
I get the same errors in the Dev console as @brandon1024 . |
|
Since it works after a reload my guess would be that is caused by race condition in the web vault somewhere. Maybe in the |
I've been too lazy to debug the problem, but I have noticed this issue on the iOS client. I have a test server I deploy changes to; and when I change the server the app connects to, I have to close the app and reopen/unlock it to access the data as even explicitly syncing doesn't solve the problem. In my specific case I use the same URL for both the test and production server and instead change the DNS AAAA record. I suspect that's not relevant though. |
|
One of my users also get this error. About once a day. We don't really have a clue what this is. Is there anything I can do to get more details about the error? |
|
It is most likely to do with reverse proxy setup. Remember, browser might not show what it can't see. |
|
I have the same problem nearly every day when I first login to our selfhosted vaultwarden web interface. |
|
I haven't seen this issue in quite some time. Interestingly, this seems to coincide with a migration from slower hardware (raspberry pi 4) to faster hardware (dell optiplex). @stefan0xC you mentioned that this could be caused by a race condition; do you think this could be a race condition on server side or client side? In any case, enough people have run into this that I think it's a good time to reopen the bug: #3781 |
|
Currently using vaultwarden 1.31.0 and web-vault 2024.5.1 and have not encountered the issue yet. Will keep monitoring it for the next few weeks to be absolutely sure the issue is fixed. |
|
I totally forgot about this issue -- I haven't seen it in some time either, it started working again around ~1.30.0-1.31.0. Closing this discussion 👍 |









We have just updated to 1.31 and so far we haven't seen the bug manifest again. We'll keep an eye on the following days and will report back.