mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4508] Bug: UNIQUE constraint failed: clients.email #3076
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3076
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hbjbozorgi on GitHub (May 23, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4508
Describe the bug
Hi
After upgrade to v 3.1, when i want to add client this error appeared:
Something went wrong (UNIQUE constraint failed: clients.email)
How to repeat the problem?
Expected action
No response
Received action
No response
3x-ui Version
3.1.0
Xray-core Version
v26.5.9
Checklist
@routegg commented on GitHub (May 23, 2026):
When editing a client, a duplicate profile appears without any assigned inbound, while the modified profile drops to the bottom of the page as if it were a new one. To make everything work again, you need to manually delete the unassigned/duplicate profile
@MHSanaei commented on GitHub (May 24, 2026):
need more info
@hbjbozorgi commented on GitHub (May 24, 2026):
Hello Dear @MHSanaei
I was using version 3.0.2, and yesterday when version 3.1 was released, I updated the server. As the first step, I went to the user creation section and encountered the following error. I had no other choice but to downgrade the server back to the previous version.
Error message: Something went wrong (UNIQUE constraint failed: clients.email)
@MHSanaei commented on GitHub (May 24, 2026):
more info means
logs
configs
database
...
@joseph7998miller-hash commented on GitHub (May 25, 2026):
This is related to one of my current issues. After updating to version 3.1, some clients created in version 3.0.1 didn't have any attached inbounds, so I tried to fix them manually. During this process, some clients wouldn't accept the changes and gave me the error message: UNIQUE constraint failed: clients.email (As I mentioned before, I also got this error when trying to edit the details of clients created in version 2.x and imported to 3.0.1).
I deleted the clients that had no inbounds and wouldn't let me attach new ones. Then, I tried editing the old 2.x clients again, and this time it worked. However, the clients I had deleted somehow recreated themselves. I repeated this deletion process 3 or 4 times. Now the database seems okay, except for a problem with the subscription links.
Every time I create a new client on mobile, the subscription link shows the send/ received data as 'infinite', but I don't have this problem when I switch to Desktop view. The subscription link issue also persists for the old clients, maybe this things are related maybe not.
@PlanSK commented on GitHub (May 26, 2026):
I encountered this bug under different circumstances. I deploy the app via Docker. Everything works fine after the initial setup. However, any container restart corrupts the database, throwing this error in the logs. I specifically tested version 3.0.2, and the database handles restarts without any issues there.
@diduweiwu commented on GitHub (May 28, 2026):
Switch sqlite to pgsql will help solve this issue.
Good luck
@PlanSK commented on GitHub (May 28, 2026):
I was just thinking about this today, thanks. I just wanted give more information about this issue.
@MHSanaei commented on GitHub (May 28, 2026):
fixed
wait for next update
@hbjbozorgi commented on GitHub (May 28, 2026):
Hi Dear @MHSanaei
I updated to version 3.2, it's not fixed. Do you mean the newer version?
@MHSanaei commented on GitHub (May 29, 2026):
it fixed for new inbound but for your old inbound you just need to change the tag id for it