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 @ghost on GitHub (Jul 8, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1050
### 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`))",
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.
<!-- gh-comment-id:655798528 -->
@mqus commented on GitHub (Jul 8, 2020):
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.
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
<!-- gh-comment-id:655804233 -->
@ghost commented on GitHub (Jul 8, 2020):
>
>
> 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
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
<!-- gh-comment-id:656213191 -->
@ghost commented on GitHub (Jul 9, 2020):
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
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.
<!-- gh-comment-id:667542123 -->
@gevelr commented on GitHub (Aug 1, 2020):
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.

Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ghost on GitHub (Jul 8, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1050
Subject of the issue
Organisation edits/save failure
Your environment
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, CONSTRAINTcollections_ibfk_1FOREIGN KEY (org_uuid) REFERENCESorganizations(uuid))",@mqus commented on GitHub (Jul 8, 2020):
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.
@ghost commented on GitHub (Jul 8, 2020):
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
@ghost commented on GitHub (Jul 9, 2020):
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
@jjlin commented on GitHub (Jul 10, 2020):
Is this consistently reproducible? If so, can you provide specific steps?
@gevelr commented on GitHub (Aug 1, 2020):
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.

@sjansen1 commented on GitHub (Aug 5, 2020):
I can confirm this issue. I am on 2.15.1