mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6943] [Bug]: Telegram Bot fails to display interactive menu after /start in v3.11.0 #4596
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#4596
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 @jamesliu96 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6943
Describe the bug
After upgrading from v3.10.2 to v3.11.0, the configured Telegram Bot stops displaying the interactive menu after sending the /start command. This issue is consistently reproducible.
In previous versions (e.g., v3.10.2), the menu loaded correctly. This is likely related to the major Telegram bot refactor introduced in the v3.11.0 release.
How to reproduce the problem
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.11.0
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Debian 13
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
@github-actions[bot] commented on GitHub (Oct 26, 2026):
I can't confirm or rule out a bug yet. In v3.11.0,
/startgoes through code that was completely rewritten, and that code can end in several different ways. I need to know which one you saw before I can say where it goes wrong.What changed in v3.11.0. Commit
15fee2a0(feat(tgbot): rebuild the Telegram bot around editable screens and inline lists (#6760), first released in v3.11.0) replaced the old text reply with a single photo message. Its caption is the summary and its inline buttons are the menu, and it is edited in place from then on (internal/web/service/tgbot/screen.go:19-21). The bot also deletes your/startmessage after it answers (tgbot_router.go:128), so the chat can look different from v3.10.2 even when everything works. When I read the admin path, it looks sound:answerCommand→screenHome→renderScreen(tgbot_router.go:260-275,screen_views.go:25-32,screen.go:135-161). I could not run the bot here, so I can't reproduce your setup.These are the outcomes the current code can produce after
/start. Each one has a different cause:tgbot_router.go:1256-1266,refuseGroups). v3.10.2 had no such check.tgbot_router.go:269-272,tgbot_level.go:20-32).Failed to send a screen:screen.go:277-279).To narrow it down, please reply with:
/start: nothing, one of the messages in the table above (quote the text), or something else./start: a private chat with the bot, or a group/supergroup (including forum topics)./start. Telegram failures are logged at warning or debug level. You can follow the log with: Lines mentioningTelegram,Failed to send a screen,Screen not editableorscreen artmatter most. Redact your bot token.Verdict: Insufficient information
Severity: N/A
Confidence: Medium
Root cause: Not identified. The admin
/startpath in the current code renders the home screen with no visible defect, so the cause depends on which of the outcomes above the reporter hit.Same class: None found
Already fixed: Not applicable.
/starthandling is unchanged between v3.11.0 and the default branch.Duplicate of: None. Searched for "telegram bot start" and "bot menu 3.11"; no matching report.
Evidence:
tgbot_router.go:273-274(t.clearBroadcastPrompt(...)/t.screenHome(chatId, message.From.ID)).screen.go:277-279(logger.Warning("Failed to send a screen:", err);return 0).tgbot_router.go:1260(if chatType := updateChatType(update); chatType != "" && chatType != telego.ChatTypePrivate {): group refusal, introduced in15fee2a0.git diff v3.10.2 v3.11.0 -- internal/web/service/tgbottouches 39 files.Not determined: Which branch the reporter hits. Their reply to item 1, plus the log lines from item 4, would settle it.
This reply was generated automatically; a maintainer may follow up.
@Aleksander-2024 commented on GitHub (Oct 26, 2026):
тоже самое /start: в приватный чат с ботом ничего не происходит((( полная тишина(( до line mode is disabled
Lists in the bot open through inline search. Enable it in @BotFather with /setinline, otherwise tapping a search button does nothing. как то еще работало а после Enable it in @BotFather with /setinline даже / start не работает
@Aleksander-2024 commented on GitHub (Oct 26, 2026):
как я понял....
3x-ui пытается отправить в Telegram фотографию для экрана меню, но Telegram отвергает указанный идентификатор файла или URL.
В коде 3x-ui предусмотрено использование фотографии бота для экранов меню и обновление устаревшего кэша изображения. Поэтому это безопасная первая проверка вручную изменил фото бота и заработал бот, всем спасибо
@jamesliu96 commented on GitHub (Oct 26, 2026):
@Aleksander-2024 In my case, regardless of whether Inline Mode is enabled or not, sending /start gets swallowed with no response whatsoever. This issue did not exist before upgrading to v3.11.0 (v3.10.2 was fine). Changing the bot's avatar myself didn't help either.
@github-actions[bot] commented on GitHub (Oct 26, 2026):
This is a real v3.11.0 bug. The bot draws every screen, including the
/startmenu, as a photo that reuses the bot's own profile picture. If Telegram refuses that picture, the panel logs one warning and sends nothing else, so/startgets no reply at all. @Aleksander-2024's report that the bot came back after they changed its avatar in @BotFather matches this code path exactly.Workaround until it's fixed:
/mybots→ your bot → Edit Bot → Edit Botpic and upload a new, ordinary static picture. You can also remove the avatar, and the panel then uses its own generated black tile.x-ui restart. Then send/startagain.@jamesliu96, to confirm you're hitting this cause and not a different one, please check the log for this line when you send
/start:If it's there, the text after it is Telegram's reason for refusing the picture. Please paste it here with your token redacted.
Why it happens.
attachArtpins the cached avatarfile_idon every screen (internal/web/service/tgbot/screen.go:170-172).replaceScreenthen sends it with no fallback:The black-tile upload (
artUpload,screens_art.go:131) only runs when nofile_idis cached. It never runs when a cached one is rejected. The cache doesn't heal on its own either:resolveScreenArtre-reads the same avatar everyartAvatarTTL = 10 * time.Minute(screens_art.go:43,:86-92) and stores the samefile_idagain. So the bot stays silent for as long as that avatar is set.Verdict: Confirmed bug
Severity: High
Confidence: Medium. The missing fallback is confirmed in the source. That it is what this reporter hits rests on the second commenter's avatar fix plus the matching symptom; the log line above would make it certain.
Root cause:
internal/web/service/tgbot/screen.go:277-280,(*Tgbot).replaceScreen. WhenSendPhotowith the cached avatarfile_idfails, it returns 0 and does not retry with theartUploadtile.resolveScreenArt(screens_art.go:49-93) keeps re-caching the samefile_id. Introduced in15fee2a0(feat(tgbot): rebuild the Telegram bot around editable screens and inline lists (#6760)).Same class: Every screen, because all of them go through
renderScreen→attachArt(screen.go:135-175). A failed media edit ineditScreen(screen.go:188-196) falls through toreplaceScreen(screen.go:160) with the samefile_id, so callbacks and pager taps also fail once the live message is gone.Already fixed: Still present on the default branch. There are no
internal/web/service/tgbotcommits after v3.11.0.Duplicate of: None
Evidence:
screen.go:170-172(if id, ok := artFileID(sc.kind); ok { sc.photo = id).screen.go:277-279(logger.Warning("Failed to send a screen:", err)/return 0).screens_art.go:87-91(fileID := sizes[len(sizes)-1].FileID…screenArtIDs[kind] = fileID).screens_art.go:131-134(artUpload, black tile, used only by thesc.hasPhotobranch with no cached id). No test inscreens_test.gocovers asendPhotothat rejects the avatarfile_id.Not determined: Which property of an avatar makes Telegram refuse its
file_idinsendPhoto. TheFailed to send a screen:error text from an affected panel would answer that.Suggested fix: In
replaceScreen, when thefile_idsend fails, retry once withartUpload(sc.kind). Also drop the rejected id fromscreenArtIDsand mark the avatar unusable until it changes, so later renders don't hit the same failure. Doing this atreplaceScreencovers/startand theeditScreenfallback together.@MHSanaei, this is a High-severity regression in the v3.11.0 bot.
This reply was generated automatically; a maintainer may follow up.
@jamesliu96 commented on GitHub (Oct 26, 2026):
Running this command yielded no output. It doesn't look like there are any errors here.
@Aleksander-2024 commented on GitHub (Oct 26, 2026):
именно после этих манипуляций бот заработал
@jamesliu96 commented on GitHub (Oct 27, 2026):
@Aleksander-2024 I followed your steps as well, but no luck on my end. I tried restarting the service and updating the bot profile picture, but neither resolved the issue.
@johnnyliat commented on GitHub (Oct 30, 2026):
[Bug] Telegram bot stops responding after the first
/startcommand (v3.11.0)What's happening?
I'm having an issue with the Telegram bot in 3x-ui v3.11.0.
After restarting x-ui, the bot responds to the first
/startcommand and displays the menu normally. However, when I send/startagain, the command gets deleted and the bot doesn't send anything back.This happens even with a newly configured bot. I haven't cleared the chat history or deleted any messages.
The panel logs show this error:
Steps to reproduce
/start./startagain.sendPhotoerror above.What I expected
The bot should display the menu every time I send
/start, not just the first time.Even when Telegram rejects a profile photo, the bot should still be able to display the menu using a fallback image.
What actually happens
The first
/startworks after restarting x-ui, but subsequent requests fail. The bot deletes the command without displaying anything, and the logs show a Telegram API 400 error.What I've tried
/startagain.Changing the profile picture and restarting the service hasn't fixed it.
Possible cause
After looking through the Telegram bot screen-rendering code, I suspect the issue is related to cached Telegram profile photo
file_idvalues.It looks like the panel tries to send a screen using a cached photo ID. When Telegram rejects that ID, the operation fails and returns without trying the local fallback image.
Could the bot automatically fall back to
artUpload()when sending a cached photo ID fails? It would also help to invalidate the rejected ID so the same broken file ID isn't reused.The menu should remain functional even if the bot's profile picture can't be sent.
Environment
Thanks for looking into this. Hopefully this helps track down the issue.
@BillGilbert- commented on GitHub (Nov 7, 2026):
Мне было достаточно поставить у себя в tg статичную картинку на бота, подождать vbyen 10 и меню заработало.