Skip to content

Empty responses from 3x-ui API when connecting clients via /panel/api/inbounds/addClient endpoint in version 2.6.2. #3236

Description

@theorangecolorv2

Describe the bug

When using the API to add clients via endpoint /panel/api/inbounds/addClient, the system periodically returns empty responses. This prevents the creation of new clients for some users, although for others the requests are successful. The problem is non-permanent: for example, for user_id 1173379288, all three attempts fail with an empty response, whereas for user_id 5636013803, the request passes on the first attempt.

How to repeat the problem?

Use the add_client method with the inbound_id and email specified (in the format of the user_id string).

Send a POST request to /panel/api/inbounds/addClient with payload:

{
"uuid": "<generated_uuid>",
"email": "<user_id>",
"totalGB": 0,
"expiryTime": 0,
"enable": true
}

Observe an empty response from the server for some requests even after three attempts with delays

Expected action

Expected behavior:
The API returns a JSON response:

{
"success": true,
"obj": {...}
}

with data about the added client.

Received action

Actual behavior:
For some users, the API is a simple response (without a body) that causes responses in the code and the inability to access the website. The problem does not affect all users.

Logs:

Unexpected request for user_id 1173379288:

2025-07-14 19:13:21,358 - xui_api - INFO - 1/3 Attempt to add a client for email 1173379288.
2025-07-14 19:13:21,366 - xui_api - WARNING - Attempt 1 failed: X-UI returned an empty response.
2025-07-14 19:13:21.367 - xui_api - INFO - Retry in 0.5 seconds...
2025-07-14 19:13:21.868 - xui_api - INFO - Attempt 2/3 to add a client for email 1173379288.
2025-07-14 19:13:21.873 - xui_api - WARNING - Attempt 2 failed: X-UI returned an empty response.
2025-07-14 19:13:21.874 - xui_api - INFO - Retry after 1.0 seconds...
2025-07-14 19:13:22.875 - xui_api -INFO - Attempt 3/3 add client for email 1173379288.
2025-07-14 19:13:22.879 - xui_api - WARNING - Attempt 3 failed: X-UI returned an empty response.
2025-07-14 19:13:22.879 - xui_api - ERROR - Failed all 3 attempts for email 1173379288. I give up.

A convenient query for user_id 5636013803:

2025-07-14 17:17:57.951 - xui_api - INFO - 1/3 Attempt to add client for email 5636013803.
2025-07-14 17:17:57.974 - xui_api - INFO - Successfully ADDED client 1167cdc6-00f5-49e1-abb5-8d705c52827a for email 5636013803 on the first attempt.

3x-ui Version

2.6.2

Xray-core Version

25.6.8

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions