Unable to save edits to Organization #1674

Closed
opened 2025-10-09 17:25:09 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @usuallymatt on GitHub.

Subject of the issue

Organisation edits/save failure

Your environment

  • Bitwarden_rs version: 2.15.1
  • Install method: docker
  • Clients used: firefox
  • Reverse proxy and version: traefik
  • Other relevant information:

Steps to reproduce

Create a organisation with a name and billing email address. Edit the organization and attempt to save any edits.

Expected Behaviour

Edits are saved

Actual Behaviour

Unable to save. Error message = "An unknown error has occured"

Relevant logs

[CAUSE] DatabaseError(,
"Cannot delete or update a parent row: a foreign key constraint fails (bitwarden.collections, CONSTRAINT collections_ibfk_1 FOREIGN KEY (org_uuid) REFERENCES organizations (uuid))",

Originally created by @usuallymatt on GitHub. ### Subject of the issue Organisation edits/save failure ### Your environment * Bitwarden_rs version: 2.15.1 * Install method: docker * Clients used: firefox * Reverse proxy and version: traefik * Other relevant information: ### Steps to reproduce Create a organisation with a name and billing email address. Edit the organization and attempt to save any edits. ### Expected Behaviour Edits are saved ### Actual Behaviour Unable to save. Error message = "An unknown error has occured" ### Relevant logs [CAUSE] DatabaseError(, "Cannot delete or update a parent row: a foreign key constraint fails (`bitwarden`.`collections`, CONSTRAINT `collections_ibfk_1` FOREIGN KEY (`org_uuid`) REFERENCES `organizations` (`uuid`))",
Author
Owner

@jjlin commented on GitHub:

Is this consistently reproducible? If so, can you provide specific steps?

@jjlin commented on GitHub: Is this consistently reproducible? If so, can you provide specific steps?
Author
Owner

@mqus commented on GitHub:

As it seems to be a database issue, could you share which database backend you are using and how you installed bitwarden? E.g. did you migrate from a different backend or restore some backups?

Your bitwarden_rs version could also help, what you shared was the version of the bitwarden plugin/vault. To find it, look at the top of your logs or in the admin interface, it should be something like 1.15.x or similar.

@mqus commented on GitHub: As it seems to be a database issue, could you share which database backend you are using and how you installed bitwarden? E.g. did you migrate from a different backend or restore some backups? Your bitwarden_rs version could also help, what you shared was the version of the bitwarden plugin/vault. To find it, look at the top of your logs or in the admin interface, it should be something like 1.15.x or similar.
Author
Owner

@gevelr commented on GitHub:

I've got the same issue. I am using bitwardenrs/server-mysql version 2.15.1. The error also occurs on bitwardenrs/server with SQLite database.
logfile

@gevelr commented on GitHub: I've got the same issue. I am using bitwardenrs/server-mysql version 2.15.1. The error also occurs on bitwardenrs/server with SQLite database. ![logfile](https://user-images.githubusercontent.com/20126280/89104014-5776e480-d416-11ea-813d-b8babb606209.png)
Author
Owner

@usuallymatt commented on GitHub:

I have also tried with the standard image that uses sqllite and get these errors which I also get with the mariadb version too:

[2020-07-08 19:44:14][error][ERROR] Error saving organization.,
[2020-07-08 19:44:03][request][INFO] GET /api/accounts/profile,
[2020-07-08 19:44:07][request][INFO] GET /api/accounts/revision-date,
[2020-07-08 19:44:03][response][INFO] GET /api/accounts/profile (profile) => 200 OK,
[2020-07-08 19:44:07][response][INFO] GET /api/accounts/revision-date (revision_date) => 200 OK,
[2020-07-08 19:44:09][request][INFO] GET /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d/collections,
[2020-07-08 19:44:09][response][INFO] GET /api/organizations/<org_id>/collections (get_org_collections) => 200 OK,
[2020-07-08 19:44:09][request][INFO] GET /api/ciphers/organization-details?organizationId=04f00622-ef8c-4,
[2020-07-08 19:44:09][response][INFO] GET /api/ciphers/organization-details?<data..> (get_org_details) => 200 OK,
[2020-07-08 19:44:10][request][INFO] GET /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d,
[2020-07-08 19:44:10][response][INFO] GET /api/organizations/<org_id> (get_organization) => 200 OK,
[2020-07-08 19:44:10][request][INFO] GET /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d/tax,
[2020-07-08 19:44:10][response][INFO] GET /<p..> [10] (web_files) => 404 Not Found,
[2020-07-08 19:44:14][request][INFO] PUT /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d

@usuallymatt commented on GitHub: I have also tried with the standard image that uses sqllite and get these errors which I also get with the mariadb version too: [2020-07-08 19:44:14][error][ERROR] Error saving organization., [2020-07-08 19:44:03][request][INFO] GET /api/accounts/profile, [2020-07-08 19:44:07][request][INFO] GET /api/accounts/revision-date, [2020-07-08 19:44:03][response][INFO] GET /api/accounts/profile (profile) => 200 OK, [2020-07-08 19:44:07][response][INFO] GET /api/accounts/revision-date (revision_date) => 200 OK, [2020-07-08 19:44:09][request][INFO] GET /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d/collections, [2020-07-08 19:44:09][response][INFO] GET /api/organizations/<org_id>/collections (get_org_collections) => 200 OK, [2020-07-08 19:44:09][request][INFO] GET /api/ciphers/organization-details?organizationId=04f00622-ef8c-4, [2020-07-08 19:44:09][response][INFO] GET /api/ciphers/organization-details?<data..> (get_org_details) => 200 OK, [2020-07-08 19:44:10][request][INFO] GET /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d, [2020-07-08 19:44:10][response][INFO] GET /api/organizations/<org_id> (get_organization) => 200 OK, [2020-07-08 19:44:10][request][INFO] GET /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d/tax, [2020-07-08 19:44:10][response][INFO] GET /<p..> [10] (web_files) => 404 Not Found, [2020-07-08 19:44:14][request][INFO] PUT /api/organizations/04f00622-ef8c-41a2-a896-decd7e71501d
Author
Owner

@usuallymatt commented on GitHub:

As it seems to be a database issue, could you share which database backend you are using and how you installed bitwarden? E.g. did you migrate from a different backend or restore some backups?

Your bitwarden_rs version could also help, what you shared was the version of the bitwarden plugin/vault. To find it, look at the top of your logs or in the admin interface, it should be something like 1.15.x or similar.

Apologies, the version of bitwarden_rs is 1.15.1-77e47ddd
I'm using a mariadb backend and I installed fresh using the bitwardenrs/server-mysql:latest docker image and maridb docker image

@usuallymatt commented on GitHub: > > > As it seems to be a database issue, could you share which database backend you are using and how you installed bitwarden? E.g. did you migrate from a different backend or restore some backups? > > Your bitwarden_rs version could also help, what you shared was the version of the bitwarden plugin/vault. To find it, look at the top of your logs or in the admin interface, it should be something like 1.15.x or similar. Apologies, the version of bitwarden_rs is **1.15.1-77e47ddd** I'm using a mariadb backend and I installed fresh using the **bitwardenrs/server-mysql:latest** docker image and **maridb** docker image
Author
Owner

@sjansen1 commented on GitHub:

I can confirm this issue. I am on 2.15.1

@sjansen1 commented on GitHub: I can confirm this issue. I am on 2.15.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1674