mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #7045] [Bug]: Telegram bot loses client configuration after initial success in native multi-node setup #5658
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#5658
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 @ergolyam on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7045
Describe the bug
I'm using the built-in multi-node system with several connected nodes and multiple inbounds.
After linking a Telegram account to an existing client, the bot confirms that the account was successfully linked. However, shortly afterward, it starts reporting that the client's configuration cannot be found.
The strange part is that the client still exists, the Telegram ID is correctly displayed in the admin panel, and the bot can sometimes show the client's traffic statistics, connection status, and assigned inbounds.
I noticed that fully restarting the 3x-ui container temporarily fixes the issue. The bot works for one
/start, but then the problem returns. Restarting through the panel's built-in restart button does not help.I suspect that synchronization with the connected sub-nodes may be overwriting or resetting some client information, but I haven't confirmed this.
How to reproduce the problem
/start./startagain or press the "Links" button.Expected behavior
Once a Telegram account is linked to a client, the bot should consistently recognize that client and provide access to their configurations, regardless of background node synchronization.
A container restart should not be necessary to restore the Telegram bot's functionality.
Actual behavior
The Telegram account is linked successfully, but the bot intermittently loses access to the client's configuration and displays:
"Your configuration is not found! Please ask your admin to use your Telegram ChatID in your configuration(s)."
The client remains active, and its traffic statistics are still available.
A complete container restart temporarily resolves the issue, while restarting through the panel does not.
Relevant logs
Screenshots
3x-ui version
3.11.0
Xray-core version
26.10.21
How did you install 3x-ui?
Docker / Docker Compose
Operating system
Debian 13
Which parts of the panel are affected?
Multi-node (sub-nodes), Telegram bot, Subscription (share links / Clash / JSON)
Browser (only if it is a UI bug)
Not applicable.
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Nov 1, 2026):
I can't confirm or rule out a bug yet. The code points to two possible causes, and the facts below would tell me which one you are hitting. I've added the
clarification neededlabel. I couldn't open your screenshots, so please send the details below as text.Where the message comes from. "Your configuration is not found!" (
tgbot.answers.askToAddUserId) is shown in two cases on/start, and also from the Links/QR buttons:levelOf(internal/web/service/tgbot/tgbot_level.go:20) finds no row in theclientstable with yourtg_id. You are then treated as a stranger (tgbot_router.go:274-276).GetClientTrafficTgBot(internal/web/service/inbound_traffic.go:1073) returns nothing. That query only finds a client when all three of these hold: This is the case inscreenClientHome(screen_views.go:37-39) andopenOwnClientScreen(screen_client_views.go:345-352).How node sync could cause case 1. On every node traffic sync,
setRemoteTrafficreads each node's inbound clients and callsSyncInbound(internal/web/service/inbound_node.go:1377). That runsapplyClientRecordMerge, which copies the node's value over the panel's value without any check (internal/web/service/client_link.go:76):The startup merge only takes a non-zero value (
internal/database/model/model.go:1612):So if any node's copy of the client has
tgId: 0, each sync would resetclients.tg_idto 0. A full container restart rebuilds the records from the panel's own JSON, which would explain why the bot works once and then breaks again. This is a guess about your setup: I can't see what your nodes report.There's one problem with that theory. You say the panel still shows the Telegram ID, and the Clients list reads that column directly (
ClientService.List,client_lookup.go:183). If the ID really is visible at the moment the bot fails, you are in case 2 instead: a missingclient_trafficsrow or a missingclient_inboundslink.Please reply with:
sqlite3 /etc/x-ui/x-ui.dbinside the container), with the client's email substituted:/start <code>), or by typing the ChatID into the client form.setRemoteTrafficortgbotfrom around the time it breaks.This reply was generated automatically; a maintainer may follow up.