MHSanaei/3x-ui · warning
❌ Failed to get inbounds.
Error message
❌ Failed to get inbounds.
What it means
SubmitAddClient (the Telegram bot's add-client flow) fails when no inbound was selected: receiver_inbound_IDSs is empty AND the legacy single receiver_inbound_ID is not positive. The bot cannot create a client without at least one inbound to attach it to, and per-inbound protocol defaults (UUID/password generation) are derived from the inbound. The message comes from bot i18n key tgbot.answers.getInboundsFailed.
Source
Thrown at internal/web/service/tgbot/tgbot_client.go:119
if label == "" {
label = fmt.Sprintf("#%d", id)
}
parts = append(parts, label)
}
return strings.Join(parts, ", ")
}
// SubmitAddClient sends the in-progress client to ClientService.Create with
// the full set of attached inbound ids. Per-inbound fillProtocolDefaults on
// the panel generates UUID/password/auth per protocol, so the bot only
// supplies the universal fields it actually collected.
func (t *Tgbot) SubmitAddClient() (bool, error) {
inboundIDs := receiver_inbound_IDs
if len(inboundIDs) == 0 && receiver_inbound_ID > 0 {
inboundIDs = []int{receiver_inbound_ID}
}
if len(inboundIDs) == 0 {
return false, errors.New(t.I18nBot("tgbot.answers.getInboundsFailed"))
}
tgIDInt, _ := strconv.ParseInt(client_TgID, 10, 64)
client := model.Client{
Email: client_Email,
Enable: client_Enable,
LimitIP: client_LimitIP,
TotalGB: client_TotalGB,
ExpiryTime: client_ExpiryTime,
SubID: client_SubID,
Comment: client_Comment,
Reset: client_Reset,
TgID: tgIDInt,
}
return t.clientService.Create(&t.inboundService, &service.ClientCreatePayload{
Client: client,
InboundIds: inboundIDs,View on GitHub (pinned to ad32144c42)
Solutions
- Restart the add-client flow and explicitly select at least one inbound before submit
- If the inbound picker showed nothing, verify inbounds exist and are enabled in the panel first
- Bot maintainers: guard the submit callback with a 'select an inbound' prompt instead of erroring
Defensive patterns
Strategy: validation
Validate before calling
if len(receiver_inbound_IDs) == 0 && receiver_inbound_ID <= 0 {
// prompt user to select inbounds instead of submitting
} Prevention
- Block the submit step in the bot flow until at least one inbound is selected
- Verify the panel has enabled inbounds before starting the add-client flow
When it happens
Trigger: Bot conversation flow where the user skips the inbound-selection step; the inbound list message was never answered (timeout/canceled); receiver state reset between steps.
Common situations: Users typing /addclient then submitting without picking inbounds; state cleared by a bot restart mid-conversation.
Related errors
- telegram bot disabled
- bot not started
- tg_id must be a positive integer
- bot not initialized
- telegram bot is not running (check token and chat ID)
AI-assisted analysis of MHSanaei/3x-ui@ad32144c42 (2026-08-15).
Data as JSON: /api/errors/b69d2aa1a16db992.
Report an issue: GitHub.