[GH-ISSUE #4585] [Bug]: Login when Telegram is down #3146

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

Originally created by @hatamiarash7 on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4585

Describe the bug

If, for any reason, there is a problem with the connection to Telegram and at the same time the option to send login notifications to Telegram is enabled, the login process will be disrupted and will never be completed.

How to reproduce the problem

  1. Open Panel Settings -> Telegram Bot
  2. Enable Login Notification in the Notifications section
  3. Simulate a connection disruption to Telegram. Including a broken outbound, network route on the operating system side, or anything else.
  4. Log out or clear the session and try to log in again

Screenshots

Image

Expected behavior

As a solution, all Telegram bot functionality should be done in a separate goroutine/thread so that it does not act as a blocker for other operations.

3x-ui version

3.1.0

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Ubuntu 24

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 @hatamiarash7 on GitHub (May 26, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4585 ### Describe the bug If, for any reason, there is a problem with the connection to Telegram and at the same time the option to send login notifications to Telegram is enabled, the login process will be disrupted and will never be completed. ### How to reproduce the problem 1. Open `Panel Settings -> Telegram Bot` 2. Enable `Login Notification` in the `Notifications` section 3. Simulate a connection disruption to Telegram. Including a broken outbound, network route on the operating system side, or anything else. 4. Log out or clear the session and try to log in again ### Screenshots <img width="2332" height="798" alt="Image" src="https://github.com/user-attachments/assets/026e239b-c477-4be7-b02e-ef645b225698" /> ### Expected behavior As a solution, all Telegram bot functionality should be done in a separate goroutine/thread so that it does not act as a blocker for other operations. ### 3x-ui version 3.1.0 ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Ubuntu 24 ### 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:30:23 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@RomanSergeev653 commented on GitHub (May 27, 2026):

Hi
I ran into a similar problem and this is how I solved it:

sqlite3 /etc/x-ui/x-ui.db "UPDATE settings SET value='false' WHERE key='tgBotEnable';"

Also make sure that you have sqlite3 installed. And after making adjustments, don't forget to restart x-ui.

<!-- gh-comment-id:4552912858 --> @RomanSergeev653 commented on GitHub (May 27, 2026): Hi I ran into a similar problem and this is how I solved it: ``` sqlite3 /etc/x-ui/x-ui.db "UPDATE settings SET value='false' WHERE key='tgBotEnable';" ``` Also make sure that you have sqlite3 installed. And after making adjustments, don't forget to restart x-ui.
Author
Owner

@Pe4enuga commented on GitHub (May 27, 2026):

Faced the same issue. Initially I decided that the problem was related to the SSL server, since the terminal returned that kind of error. In the end, it turned out that TG notifications were blocking all other TCP connections, including the auth process.

Image
<!-- gh-comment-id:4556425492 --> @Pe4enuga commented on GitHub (May 27, 2026): Faced the same issue. Initially I decided that the problem was related to the SSL server, since the terminal returned that kind of error. In the end, it turned out that TG notifications were blocking all other TCP connections, including the auth process. <img width="379" height="100" alt="Image" src="https://github.com/user-attachments/assets/d48ea077-dd97-445e-b3c0-764af96fcdb4" />
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#3146
No description provided.