-
Notifications
You must be signed in to change notification settings - Fork 1.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
Updates not coming consistently with v1.24 branch #3870
Comments
Confirm. |
There has been some fixes regarding update handling, particularly for bot accounts. I am going to close this issue since there's no particular error here that's crashing the update handling. The new update handling should be recovering update gaps (something the old update handling did not). It should still dispatch every update coming in through the socket (much like the old system did). So I'm not sure why "updates could not be coming". If there are still issues in the v1.24 branch let me know (I am referring to commit 363c260 and above). |
@Lonami I've seen my bot (v1.25) facing both this issue and #3873 in production multiple times in the last 10 days. #3873 should have been fixed in 2f2a990 but I am not sure since there has not been a new release for me to upgrade. After reading the recent commit history, I didn't find any fix strongly corresponding to this issue. But my bot actually facing a very similar scenario, so here's my error log: 2022-09-08-17:34:35:WARNING:telethon.client.users - Telegram is having internal issues HistoryGetFailedError: Fetching of history failed (caused by GetChannelDifferenceRequest)
2022-09-08-17:34:37:WARNING:telethon.client.users - Telegram is having internal issues PersistentTimestampOutdatedError: Persistent timestamp outdated (caused by GetChannelDifferenceRequest)
2022-09-08-17:34:40:WARNING:telethon.client.users - Telegram is having internal issues HistoryGetFailedError: Fetching of history failed (caused by GetChannelDifferenceRequest)
2022-09-08-17:34:42:ERROR:telethon.client.updates - Fatal error handling updates (this is a bug in Telethon, please report it)
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/telethon/client/updates.py", line 281, in _update_loop
diff = await self(get_diff)
File "/opt/venv/lib/python3.10/site-packages/telethon/client/users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "/opt/venv/lib/python3.10/site-packages/telethon/client/users.py", line 129, in _call
raise last_error
File "/opt/venv/lib/python3.10/site-packages/telethon/client/users.py", line 84, in _call
result = await future
telethon.errors.rpcerrorlist.HistoryGetFailedError: Fetching of history failed (caused by GetChannelDifferenceRequest) Every time this occurred, my bot no longer received incoming updates. I suggest (no matter whether these bugs are fixed or not) that there should be an option to immediately raise or exit when a fatal error occurs during handling updates to avoid resulting in an unresponsive bot (especially when some external services will restart the bot on failure). |
Also I've just been cleaning up branches.
Yeah the client should probably raise that back up to the user so they can deal with it in any way they see fit. I can do that before the next version. |
Thanks for your suggestion to try the latest snapshot. Unfortunately, I can't do that in production and I've never seen this bug in my local test. I would try adopting the latest snapshot in another less important bot. Waiting for the next release! |
Sorry to break it to you but my releases never have really been extensively tested, I simply make them when I feel the code is in a decent spot. I primarily test the changes as I make them. So really current |
LonamiWebs/Telethon#3870 Signed-off-by: Rongrong <i@rong.moe>
Uhh, the reason why I can't adopt a snapshot in production is just that I can't adopt a snapshot in the production docker image tag my production bot using because there are a lot of downstream image users too, but, meanwhile, I don't want to create another tag, lol. Mixed with Rongronggg9/RSS-to-Telegram-Bot@5e503f5, I will enter my production container to upgrade telethon for test. |
This should help the situation in #3870.
Hello, i opened 3-4 days ago an issue regarding update events not coming in consistently.
I tried installing the branch as you advised me to do, but it only got worse:
basically when the bot is ran it works correctly, gets the updates and the events get raised, but after a while it becomes unresponsive.
I have no logs that could reproduce the issue, beside this:
I could send the full code I'm working on, but I don't think that could make the difference, anyway if it is required there's no problem to do so.
The bot runs on a cloud machine, and I'm 100% sure it was connected at the time the event got raised.
I'm going to revert back to the release, but why is this?
Checklist
pip3 install -U https://github.com/LonamiWebs/Telethon/archive/v1.24.zip
and triggered the bug in the latest version.The text was updated successfully, but these errors were encountered: