Can't add a collection or listing members 500 Internal Server

Hello,

I’m using vaultwarden with mariadb deployed with docker, i update the stack with every new image. it was working normally but today i was trying to add a new collection but it keeps turning, when i print logs i see this

[2025-10-17 17:37:41.803][panic][ERROR] thread ‘rocket-worker-thread’ panicked at ‘called Option::unwrap() on a None value’: src/db/models/organization.rs:679
0: vaultwarden::init_logging::{{closure}}
1: std::panicking::rust_panic_with_hook
2: std::panicking::begin_panic_handler::{{closure}}
3: std::sys::backtrace::__rust_end_short_backtrace
4: __rustc::rust_begin_unwind
5: core::panicking::panic_fmt
6: core::panicking::panic
7: core::option::unwrap_failed
8: vaultwarden::api::core::organizations::get_org_user_mini_details::into_info::monomorphized_function::{{closure}}
9: rocket::server::<impl rocket::rkt::Rocketrocket::phase::Orbit>::route::{{closure}}
10: rocket::server::hyper_service_fn::{{closure}}::{{closure}}
11: tokio::runtime::task::raw::poll
12: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
13: tokio::runtime::scheduler::multi_thread::worker::run
14: tokio::runtime::task::raw::poll
15: std::sys::backtrace::__rust_begin_short_backtrace
16: core::ops::function::FnOnce::call_once{{vtable.shim}}
17: std::sys::pal::unix::thread_start
18: 
19: __clone

[2025-10-17 17:37:41.804][response][INFO] (get_org_user_mini_details) GET /api/organizations/<org_id>/users/mini-details => 500 Internal Server Error
[2025-10-17 17:37:41.809][response][INFO] (get_org_collections_details) GET /api/organizations/<org_id>/collections/details => 200 OK

does anyone have an idea on where the issue could be.

PS: i tried to go back to an older version 1.34.0 when it was working back then im sure but not working now.

Thanks for your help !

If I remember correctly this can happen if you manually delete a user account without also removing the associated tables in the database because then the organization has a dangling membership record somewhere that points to a non-existant user uuid. It could also be that your database is corrupted so you might want to check for that.

That’s right, that was the problem. I found 2 entries in the users_organizations table where the user UUID does not exist.
Thank you for your help!

To summarize what I did:

  • Checked that the database is not corrupted:

mysqlcheck -u user -p vaultwarden

  • Checked for dangling users_organizations entries:

SELECT uo.id, uo.user_uuid, uo.organization_uuid
FROM users_organizations AS uo
LEFT JOIN users AS u ON u.uuid = uo.user_uuid
WHERE u.uuid IS NULL;

1 Like