[GH-ISSUE #5064] [Bug]: delete client #3566

Closed
opened 2026-10-31 20:33:22 +07:00 by bsakaguchi · 2 comments
Owner

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

Describe the bug

when i delete a client on main panel that work and deleted
but that client still show and exist on node panel
i want delete that client on all node and main client

How to reproduce the problem

the client didnt delete on all my panel

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.8

Xray-core version

26.6.1

How did you install 3x-ui?

install.sh script

Operating system

ubuntu 26

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 @usamirali on GitHub (Jun 7, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5064 ### Describe the bug when i delete a client on main panel that work and deleted but that client still show and exist on node panel i want delete that client on all node and main client ### How to reproduce the problem the client didnt delete on all my panel ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.8 ### Xray-core version 26.6.1 ### How did you install 3x-ui? install.sh script ### Operating system ubuntu 26 ### 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:33:22 +07:00
Author
Owner

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

This is the same symptom as #4971 (closed). Here is what the code actually does and what diagnostic information is needed to pin down the failure.

How client deletion syncs to nodes

When you delete a client from the main panel, ClientService.Delete (web/service/client.go:868) iterates over every inbound the client is attached to and calls DelInboundClient for each one.

Inside DelInboundClient (web/service/client.go:4144), for node-owned inbounds (NodeID \!= nil), nodePushPlan is called (web/service/inbound.go:44):

  • Node online: push=true → rt.DeleteUser sends POST panel/api/clients/{email}/detach to the node's own 3x-ui API, which detaches the client from the inbound on the node's database and removes it from that node's Xray instance.
  • Node offline or disabled: dirty=true, push=false → the node is flagged ConfigDirty. The next time NodeTrafficSyncJob runs, it calls ReconcileNode (web/service/inbound.go:91), which pushes the full updated inbound config (without the deleted client) to the node via UpdateInbound.

Known silent failure path

rt.DeleteUser (web/runtime/remote.go:302) calls resolveRemoteID to find the inbound on the node by its tag. If the tag is not found, resolveRemoteID returns an error — but DeleteUser catches that and returns nil (line 308: return nil). Because the error is swallowed, the caller never sets markDirty, so the node is not flagged for reconciliation. The client stays on the node with no further action taken.

This is the most likely cause: the tag lookup fails silently, no error is logged, and the node never receives the deletion.

To help isolate the problem

Please provide:

  1. Main panel logs at the time of deletion. Run journalctl -u x-ui -n 300 --no-pager (or check the log path shown in panel Settings → Log) and look for any Warning or Error lines around the deletion time.

  2. Node 3x-ui version. Log in to the node server and run x-ui to see the version, or check the node panel's About page. If the node is running an older version, the /detach endpoint may not exist.

  3. Node status at the time of deletion. Was the node shown as online in the main panel's Nodes list when you deleted the client? Or was it offline/unreachable?

  4. Does the client still appear after the next traffic sync cycle? The sync job runs periodically. If the client disappears from the node panel a few minutes after deletion (but not immediately), that confirms it's going through the reconciliation path rather than the direct push.

  5. Protocol of the affected inbound (VLESS, VMess, Trojan, etc.).

If the client's email contains a / or other URL-special characters, that can also cause the /detach API call to fail — though that would normally show up in logs.

<!-- gh-comment-id:4644220669 --> @github-actions[bot] commented on GitHub (Jun 7, 2026): This is the same symptom as #4971 (closed). Here is what the code actually does and what diagnostic information is needed to pin down the failure. ## How client deletion syncs to nodes When you delete a client from the main panel, `ClientService.Delete` (`web/service/client.go:868`) iterates over every inbound the client is attached to and calls `DelInboundClient` for each one. Inside `DelInboundClient` (`web/service/client.go:4144`), for node-owned inbounds (`NodeID \!= nil`), `nodePushPlan` is called (`web/service/inbound.go:44`): - **Node online:** `push=true` → `rt.DeleteUser` sends `POST panel/api/clients/{email}/detach` to the node's own 3x-ui API, which detaches the client from the inbound on the node's database and removes it from that node's Xray instance. - **Node offline or disabled:** `dirty=true, push=false` → the node is flagged `ConfigDirty`. The next time `NodeTrafficSyncJob` runs, it calls `ReconcileNode` (`web/service/inbound.go:91`), which pushes the full updated inbound config (without the deleted client) to the node via `UpdateInbound`. ## Known silent failure path `rt.DeleteUser` (`web/runtime/remote.go:302`) calls `resolveRemoteID` to find the inbound on the node by its tag. If the tag is **not found**, `resolveRemoteID` returns an error — but `DeleteUser` catches that and returns `nil` (line 308: `return nil`). Because the error is swallowed, the caller never sets `markDirty`, so the node is **not** flagged for reconciliation. The client stays on the node with no further action taken. This is the most likely cause: the tag lookup fails silently, no error is logged, and the node never receives the deletion. ## To help isolate the problem Please provide: 1. **Main panel logs at the time of deletion.** Run `journalctl -u x-ui -n 300 --no-pager` (or check the log path shown in panel Settings → Log) and look for any `Warning` or `Error` lines around the deletion time. 2. **Node 3x-ui version.** Log in to the node server and run `x-ui` to see the version, or check the node panel's About page. If the node is running an older version, the `/detach` endpoint may not exist. 3. **Node status at the time of deletion.** Was the node shown as online in the main panel's Nodes list when you deleted the client? Or was it offline/unreachable? 4. **Does the client still appear after the next traffic sync cycle?** The sync job runs periodically. If the client disappears from the node panel a few minutes after deletion (but not immediately), that confirms it's going through the reconciliation path rather than the direct push. 5. **Protocol of the affected inbound** (VLESS, VMess, Trojan, etc.). If the client's email contains a `/` or other URL-special characters, that can also cause the `/detach` API call to fail — though that would normally show up in logs.
Author
Owner

@MHSanaei commented on GitHub (Jun 7, 2026):

We just detached it.

<!-- gh-comment-id:4644295581 --> @MHSanaei commented on GitHub (Jun 7, 2026): We just detached it.
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#3566
No description provided.