-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unresponsive after connecting to network #16093
Comments
That's the time of Qt 5.12 -> Qt 5.15 update, so probably a Qt bug |
Same here on W7. Are you sure it's related to connecting to network though? The title might be wrong. I'd say it has something to do with going out of sleep mode. |
I hope I've fixed it, there was a deadlock in Qt 5.15 on Windows in thread management. We'll see in the next version. |
Hey there! This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own. Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue. Thanks! |
Still an issue on my W7. I have to manually kill TelegramDesktop.exe each time I get out of sleep mode. |
It started to manifest again, on 3.1.8. Log tail (note the wake-up moment):
|
Same issue happens on 2 computers with Win7. Telegram stops getting any messages and stops updating channels after resuming from standby. It occurs maybe 1 time in 5-7 runs. |
In Ubuntu this happens quite often for me. Not sure if this information helps at all, but I typically get it working again without needing to restart it by going into Settings->Advanced settings and switching from which ever proxy setting there is to the other (no proxy <-> system settings). After the switch it immediately starts working again. |
MacOS ( MBP M1 ) same issue, every time (not sometime) after sleep, wont reconnect, unless manual switching in Network section "between proxy and go back." |
As #17397 got closed and this was added as the duplicate issue - just wanted to +1 here. M1 Macbook Air. After going to sleep and being woken up - Telegram is completely unresponsive unless I force close the application and open it again, after which it works just fine. |
Same issue, MacOS version 12.5.1, Telegram 4.1.1. After sleep telegram wont connect until I restart the application. |
still have this issue |
Still have this issue on flathub version 4.6.2 on Linux. Restarting the app solves the issue though. |
regarding to issue #25895, which is closed as duplicate of this one. |
snap version of linux ubuntu 22.10 the problem is relevant |
Having the same issue every time after putting my Macbook sleep overnight. Restarting Telegram becomes a daily routine of mine. Telegram 4.7, MacOS 13.1. |
Having the same problem behind an enterprise proxy. Connection type is "Use system proxy settings". |
I'm experiencing the same. To restore the connection I either need to restart the entire application or go to Settings>Advanced>Connection>Toggle IPv6 to any state just to force the app into the reconnection. |
+1 |
Same issue I was about to become a premium user, but switched from Win (no issues for years) to Mac. Can't imagine paying voluntary money for the app I have to manually reset several times a day. This bug exists for over 2 years now, other messaging apps on MacOS doesn't have this issue. |
Seems that it got worse last few months. I remember I had to restart/change proxy settings once a week last year, but eventually, it became a daily routine :( MacBook Pro M1 |
On my m2 any sleep, even 30 secs long, causes the disconnection. Hate it
since so many work related chats are now in Telegram :(
…On Wed, May 3, 2023, 14:33 allx ***@***.***> wrote:
Seems that it got worse last few months. I remember I had to
restart/change proxy settings once a week last year, but eventually, it
became a daily routine :(
MacBook Pro M1
Mac OSX 13.3.1
Telegram 4.8.1
—
Reply to this email directly, view it on GitHub
<#16093 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG7I7ATM6NOKGHN3GYBIE3XEIC3VANCNFSM42MITALQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@php4fan would you be able to build tdesktop from sources with additional logging? |
I can try |
Try to build this patch, does it print the line when you disconnect/connect?
|
3.1.9 worked very well and it reconnected every time my computer woke from sleep. Yesterday I've installed 3.1.10. Today, on my second wake from sleep it didn't reconnect. This time, the loader on the left bottom corner didn't even react to the Wifi network adapter being disabled/enabled (unlike the most recent version I used before starting these tests). |
So Qt 6 is the cause. Downgrading to Qt 5 sounds impossible so we're back to where we were: this needs debugging but no developer could reproduce this. |
It would be great if you could add an interval timer that, when it detects a loss of connection in one of several ways, could begin reconnecting. It will be better than nothing. |
@RblSb it already reconnects on connection loss. As you can see, it bugs. |
I wonder if there may be multiple different issues here. I've been having the issue of Telegram's UI becoming unresponsive after a while since 4.10, and the current version 4.14 is using Qt5 so it can't be caused by Qt6. |
Perhaps you're running 3rd party build? macOS and Linux official builds use Qt 6 since since three years ago. |
I'm using builds from the Debian repos:
Debian still builds it against Qt5 it seems (they didn't have Qt6 packages before, they do now but it seems Telegram Desktop is still using Qt5). Either way, that seems to suggest it's not a Qt6 issue if the unresponsiveness also happens when built against Qt5. Though FWIW, it's also been a while since I've run Telegram Desktop and haven't tried the last few versions. I just started it up again to see if it still happens for me. |
People say 3.1.9 is good while 3.1.10 is bad, the only difference between them is Qt version |
Moreover, bugs in third party versions might be introduced by third parties. Debian's tdesktop package is very patched as far as I'm aware, with various features being patched out. I wouldn't be surprised if their package has unique bugs. Especially since building with Qt 5 on macOS/Linux is not tested for 3 years. |
For me, 4.9 was good and the unresponsiveness only started happening with 4.10. I didn't realize Debian had so many patches, so it's understandable to think I'm experiencing an issue unique to their build. Still, the symptoms do seem similar to the original post; after a while of being idle or asleep, Telegram Desktop will randomly go unresponsive and take several moments to minutes to react to clicking its icon or anything else, seemingly also not sending or receiving any notifications, with the only way to fix it being to restart the app (where it will be fine initially, but happen again at some point). |
@ilya-fedin Does it periodically actively check whether it's connected, and if it isn't it reconnects, or does it listen for some sort of "connection loss" events, and when it gets one it reconnects? (or both?) Sorry for asking again, but every time you reply to people suggesting the second, it sounds almost like the two are the same thing to you. |
I'm getting errors when running
|
If I understand it right (I'm not the one who wrote that code nor I have a good understanding of it but that is generally how such things usually work), Qt should signal that a request is finished with a error and the handler should run a new connection attempt. Once it also fails with a error, it should spawn a timer (and you see the second counter in the UI) and once it expires, it should try to connect again and then everything repeats. Not sure what you mean by "actively check": the error from the socket is the only way to know the socket is disconnected. If this part is broken then we just can't know this exact connection is broken, we can only do the overall system connection check which I'm not sure will work if the system connects fastly after sleep. This is getting too much into the territory I have no answers for, the only person who can answer them is the person who implemented the code (the developer paid by Telegram) but he has no spare time and this is a community supplied task (GitHub issues is not an official place and people managing priorities likely don't even know about it) so has the least priority for him. |
You're lucky to do that exactly when GitHub has removed the repository of xz project and so the build is broken. |
The protocol implementation is very old and it's hard to debug and find problems there, but initially it had timeout timers for almost everything. Like, when there are no pings in a connection session for some amount of seconds it should restart, when there are no updates for some amount of seconds, when the connection interrupts with a TCP error etc etc. But there are a lot of very complicated parts, some of which were added on top many years later (and still many years ago), like connection establishment with a new temporary encryption key creation and it seems like there is some state of everything in which everything is kinda-deadlocked, like the connection is thought of as being in process of establishing, but really nothing is going to progress anymore due to some network error which resulted in data not being delivered, but still the TCP connection is thought of as alive by Qt. In that case it hangs like that indefinitely until some force-restart of connection triggers the whole process to start from the beginning, successfully this time. It would be helpful to enable debug logs (type "debugmode" in Settings) and reproduce the issue, then collect full DebugLogs folder for this run (from start till the connection can't be re-established for, let's say, five minutes) and .zip them and send to me at https://t.me/preston, so that I could (maybe?) understand this connection-related state of the app when it fails to reconnect by timeout by itself. Be aware that debug logs contain all the network data being exchanged, so share them anywhere publicly. |
There's no search box to type in (I tried typing anyway but nothing happens) and I can't find such setting |
Oh wow, I needed to type the entire word "debugmode" blindly with no visual feedback 🤦 |
Yeah, it's a cheat code like in a game |
So I enabled debug logs (the normal ones, I wasn't able to recompile TD with the patch adding extra logs) and left Telegram running with them. I sent the logs to @john-preston . One thing I suggest you fix in the way debug logs are written is that the timestamps only include the time of day but not the date, and the filenames are also based solely on the time (e.g. |
Ok, I've deployed 4.16.5 with a fix to the problem that I've found from the logs I've received. Please update in Settings > Advanced and keep an eye, is it working now or not. If it wasn't fixed and is not connecting the same way after wake-up for some significant time (let's say 10 minutes) I'd ask for new debug logs, from 4.16.5 version. Thanks! |
Works pretty good, thank you! |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Steps to reproduce
Expected behaviour
Main window shows up.
Actual behaviour
No response.
This happens often, but not every time, and started about 2-3 months ago.
Configuration
Operating system: Windows 7 [Version 6.1.7600]
Version of Telegram Desktop: 2.7.1
Used theme: Default
Logs:
log_freeze.zip
Screenshot from Process Explorer:
The text was updated successfully, but these errors were encountered: