Originally created by @ChrisWiegman on GitHub (Jul 21, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1065
<!--
Please fill out the following template to make solving your problem easier and faster for us.
This is only a guideline. If you think that parts are unneccessary for your issue, feel free to remove them.
Remember to hide/obfuscate personal and confidential information,
such as names, global IP/DNS adresses and especially passwords, if neccessary.
-->
### Subject of the issue
On a new setup, I am unable to configure any email addresses. The log displays the following:
```bitwarden_1 | [2020-07-21 22:41:52][bitwarden_rs::api::core::accounts][ERROR] Error saving email verification: Error saving user.
bitwarden_1 | [CAUSE] DatabaseError(
bitwarden_1 | ForeignKeyViolation,
bitwarden_1 | "Cannot delete or update a parent row: a foreign key constraint fails (`bitwarden`.`devices`, CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`user_uuid`) REFERENCES `users` (`uuid`))",
bitwarden_1 | )
```
### Your environment
<!-- The version number, obtained from the logs or the admin page -->
* Bitwarden_rs version: 1.16.0
<!-- How the server was installed: Docker image / package / built from source -->
* Install method: Docker
* Clients used: <!-- if applicable -->
* Reverse proxy and version: Traefik 2.2
* Version of mysql/postgresql: MariaDB 10.5.4
* Other relevant information:
### Steps to reproduce
1. Bring up Bitwarden
2. Register a new user
3. Click email verification link
4. See "Verify your email address" still visible in account
### Expected behaviour
Clicking the verification link should verify the email address
### Actual behaviour
Email address is not verified
### Relevant logs
<!-- Share some logfiles, screenshots or output of relevant programs with us. -->
```bitwarden_1 | [2020-07-21 22:50:18][request][INFO] POST /api/accounts/verify-email-token
bitwarden_1 | [2020-07-21 22:50:18][bitwarden_rs::api::core::accounts][ERROR] Error saving email verification: Error saving user.
bitwarden_1 | [CAUSE] DatabaseError(
bitwarden_1 | ForeignKeyViolation,
bitwarden_1 | "Cannot delete or update a parent row: a foreign key constraint fails (`bitwarden`.`devices`, CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`user_uuid`) REFERENCES `users` (`uuid`))",
bitwarden_1 | )
bitwarden_1 | [2020-07-21 22:50:18][response][INFO] POST /api/accounts/verify-email-token (post_verify_email_token) => 200 OK```
I am running into this same issue using almost exactly the same setup.
I switched from MariaDB 10.5.4 to MySQL 5.7 (mysql:5.7 docker image) and everything worked as intended. Although personally would like to stick with MariaDB.
<!-- gh-comment-id:670953162 -->
@skywiley commented on GitHub (Aug 8, 2020):
I am running into this same issue using almost exactly the same setup.
I switched from MariaDB 10.5.4 to MySQL 5.7 (mysql:5.7 docker image) and everything worked as intended. Although personally would like to stick with MariaDB.
If I had to guess, maybe related to #1081?
I had the same issue.
You can stick with MariaDB, just set the database image to mariadb:10.3
It seems that's the version compatible with MySQL 5.7.
<!-- gh-comment-id:671021516 -->
@jobec commented on GitHub (Aug 9, 2020):
I had the same issue.
You can stick with MariaDB, just set the database image to `mariadb:10.3`
It seems that's the version compatible with MySQL 5.7.
I'm afraid downgrading to an older version of the DB is not a solution in this instance. Hopefully it can be fixed with current versions of MariaDB
<!-- gh-comment-id:672027142 -->
@ChrisWiegman commented on GitHub (Aug 11, 2020):
I'm afraid downgrading to an older version of the DB is not a solution in this instance. Hopefully it can be fixed with current versions of MariaDB
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 @ChrisWiegman on GitHub (Jul 21, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1065
Subject of the issue
On a new setup, I am unable to configure any email addresses. The log displays the following:
Your environment
Steps to reproduce
Expected behaviour
Clicking the verification link should verify the email address
Actual behaviour
Email address is not verified
Relevant logs
@skywiley commented on GitHub (Aug 8, 2020):
I am running into this same issue using almost exactly the same setup.
I switched from MariaDB 10.5.4 to MySQL 5.7 (mysql:5.7 docker image) and everything worked as intended. Although personally would like to stick with MariaDB.
If I had to guess, maybe related to #1081?
@jobec commented on GitHub (Aug 9, 2020):
I had the same issue.
You can stick with MariaDB, just set the database image to
mariadb:10.3It seems that's the version compatible with MySQL 5.7.
@ChrisWiegman commented on GitHub (Aug 11, 2020):
I'm afraid downgrading to an older version of the DB is not a solution in this instance. Hopefully it can be fixed with current versions of MariaDB
@smerschjohann commented on GitHub (Aug 26, 2020):
The current workaround for me is to disable the constraint checks.
@peterneutron commented on GitHub (Sep 20, 2020):
Same issue when adding an attachment,