[GH-ISSUE #4803] [Bug]: Something went wrong (UNIQUE constraint failed: clients.email) #3339

Closed
opened 2026-10-31 20:31:45 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @alighaffari3000 on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4803

Describe the bug

Bug Description

After updating to the latest version of Panel, I am unable to assign a single client to more than one inbound.

When I try to add an existing client to a second inbound, the operation fails with the following error:

"Something went wrong (UNIQUE constraint failed: clients.email)"

How to reproduce the problem

  1. Start with an existing Panel installation running a version prior to 3.1.0. (like 2.9.2)
  2. Update the panel to version 3.1.0 or 3.2.0 or 3.2.6
  3. Open the client creation page.
  4. Create a new client.
  5. Select multiple inbounds for the client.
  6. Click Save/Create.

Result

The operation fails with the following error:

Something went wrong (UNIQUE constraint failed: clients.email)

Expected Result

The client should be created successfully and assigned to all selected inbounds.

Additional Information

This issue started after upgrading to version 3.2.6. I was attempting to create a new client and assign multiple inbounds during the initial creation process.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.6

Xray-core version

26.5.9

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @alighaffari3000 on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4803 ### Describe the bug ### Bug Description After updating to the latest version of Panel, I am unable to assign a single client to more than one inbound. When I try to add an existing client to a second inbound, the operation fails with the following error: "Something went wrong (UNIQUE constraint failed: clients.email)" ### How to reproduce the problem 1. Start with an existing Panel installation running a version prior to 3.1.0. (like 2.9.2) 2. Update the panel to version 3.1.0 or 3.2.0 or 3.2.6 3. Open the client creation page. 4. Create a new client. 5. Select multiple inbounds for the client. 6. Click Save/Create. ### Result The operation fails with the following error: ``` Something went wrong (UNIQUE constraint failed: clients.email) ``` ### Expected Result The client should be created successfully and assigned to all selected inbounds. ### Additional Information This issue started after upgrading to version 3.2.6. I was attempting to create a new client and assign multiple inbounds during the initial creation process. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.6 ### Xray-core version 26.5.9 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:31:45 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 2, 2026):

Thank you for the detailed report!

This appears to be a duplicate of #4508 (and related issues #4489, #4540), which tracks the same UNIQUE constraint failed: clients.email error introduced around v3.1.0.

What's known so far:

  • The bug occurs when trying to assign a single client to multiple inbounds, particularly when the installation was upgraded from a pre-3.1.0 version.
  • The maintainer noted in #4508 that the issue was partially fixed for new inbounds, but for old inbounds (created before the upgrade) you may need to change the inbound tag ID to resolve the conflict.

Suggested workaround for old inbounds:

  1. Go to the inbound settings for any inbound that was created before the upgrade.
  2. Edit the inbound and change its tag to a new unique value.
  3. Save and retry adding clients.

If the issue persists even with fresh inbounds on a clean v3.2.6 installation (not an upgrade), please share the relevant logs and your database setup, as that would indicate the fix is incomplete.

Closing this as a duplicate of #4508. Please follow that issue for updates.

<!-- gh-comment-id:4600955353 --> @github-actions[bot] commented on GitHub (Jun 2, 2026): Thank you for the detailed report\! This appears to be a duplicate of #4508 (and related issues #4489, #4540), which tracks the same `UNIQUE constraint failed: clients.email` error introduced around v3.1.0. **What's known so far:** - The bug occurs when trying to assign a single client to multiple inbounds, particularly when the installation was upgraded from a pre-3.1.0 version. - The maintainer noted in #4508 that the issue was **partially fixed for new inbounds**, but for **old inbounds** (created before the upgrade) you may need to **change the inbound tag ID** to resolve the conflict. **Suggested workaround for old inbounds:** 1. Go to the inbound settings for any inbound that was created before the upgrade. 2. Edit the inbound and change its **tag** to a new unique value. 3. Save and retry adding clients. If the issue persists even with fresh inbounds on a clean v3.2.6 installation (not an upgrade), please share the relevant logs and your database setup, as that would indicate the fix is incomplete. Closing this as a duplicate of #4508. Please follow that issue for updates.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3339
No description provided.