aahnik / tgcf

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
https://github.com/aahnik/tgcf/wiki
MIT License
1.29k stars 775 forks source link

TimedOutError: RPCError -503: Timedout (caused by GetChannelDifferenceRequest) #527

Open 25gabriel-cmyk opened 7 months ago

25gabriel-cmyk commented 7 months ago

I am running TGCF on my Ubuntu 22.04. Lately, I have been encountering the following error, which causes TGCF to keep pausing : TimedOutError: RPCError -503: Timedout (caused by GetChannelDifferenceRequest)

I think the problem is on the Telethon session, here's the last log :

│ flood_sleep_threshold=None): │
│ 33 │ │ if flood_sleep_threshold is None: │
│ │
│ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/users.py:84 in _call │
│ │
│ 81 │ │ │ │ │ else: │
│ 82 │ │ │ │ │ │ return results │
│ 83 │ │ │ │ else: │
│ ❱ 84 │ │ │ │ │ result = await future │
│ 85 │ │ │ │ │ self.session.process_entities(result) │
│ 86 │ │ │ │ │ self._entity_cache.add(result) │
│ 87 │ │ │ │ │ return result │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TimedOutError: RPCError -503: Timedout (caused by GetChannelDifferenceRequest)
INFO Disconnecting from 91.108.56.123:443/TcpFull... mtprotosender.py:317 INFO Disconnection from 91.108.56.123:443/TcpFull complete! mtprotosender.py:337 INFO Not disconnecting (already have no connection) mtprotosender.py:314 ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/tgcf/cli.py:120 in main │ │ │ │ 117 │ else: │ │ 118 │ │ from tgcf.live import start_sync # pylint: disable=import-outside-toplevel │ │ 119 │ │ │ │ ❱ 120 │ │ asyncio.run(start_sync()) │ │ 121 │ │ 122 │ │ 123 # AAHNIK 2021 │ │ │ │ /usr/lib/python3.10/asyncio/runners.py:44 in run │ │ │ │ 41 │ │ events.set_event_loop(loop) │ │ 42 │ │ if debug is not None: │ │ 43 │ │ │ loop.set_debug(debug) │ │ ❱ 44 │ │ return loop.run_until_complete(main) │ │ 45 │ finally: │ │ 46 │ │ try: │ │ 47 │ │ │ _cancel_all_tasks(loop) │ │ │ │ /usr/lib/python3.10/asyncio/base_events.py:649 in run_until_complete │ │ │ │ 646 │ │ if not future.done(): │ │ 647 │ │ │ raise RuntimeError('Event loop stopped before Future completed.') │ │ 648 │ │ │ │ ❱ 649 │ │ return future.result() │ │ 650 │ │ │ 651 │ def stop(self): │ │ 652 │ │ """Stop running the event loop. │ │ │ │ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/tgcf/live.py:162 in start_sync │ │ │ │ 159 │ │ │ ) │ │ 160 │ │ ) │ │ 161 │ config.from_to = await config.load_from_to(client, config.CONFIG.forwards) │ │ ❱ 162 │ await client.run_until_disconnected() │ │ 163 │ │ │ │ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/updates.py:35 in │ │ _run_until_disconnected │ │ │ │ 32 │ │ │ await self(functions.updates.GetStateRequest()) │ │ 33 │ │ │ result = await self.disconnected │ │ 34 │ │ │ if self._updates_error is not None: │ │ ❱ 35 │ │ │ │ raise self._updates_error │ │ 36 │ │ │ return result │ │ 37 │ │ except KeyboardInterrupt: │ │ 38 │ │ │ pass │ │ │ │ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/updates.py:311 in │ │ _update_loop │ │ │ │ 308 │ │ │ │ if get_diff: │ │ 309 │ │ │ │ │ self._log[name].debug('Getting difference for channel %s updates │ │ 310 │ │ │ │ │ try: │ │ ❱ 311 │ │ │ │ │ │ diff = await self(get_diff) │ │ 312 │ │ │ │ │ except ( │ │ 313 │ │ │ │ │ │ errors.PersistentTimestampOutdatedError, │ │ 314 │ │ │ │ │ │ errors.PersistentTimestampInvalidError, │ │ │ │ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/users.py:30 in │ │ call │ │ │ │ 27 │ │ 28 class UserMethods: │ │ 29 │ async def call(self: 'TelegramClient', request, ordered=False, flood_sleep_thres │ │ ❱ 30 │ │ return await self._call(self._sender, request, ordered=ordered) │ │ 31 │ │ │ 32 │ async def _call(self: 'TelegramClient', sender, request, ordered=False, floodsleep │ │ 33 │ │ if flood_sleep_threshold is None: │ │ │ │ /home/gabriel/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/users.py:84 in _call │ │ │ │ 81 │ │ │ │ │ else: │ │ 82 │ │ │ │ │ │ return results │ │ 83 │ │ │ │ else: │ │ ❱ 84 │ │ │ │ │ result = await future │ │ 85 │ │ │ │ │ self.session.process_entities(result) │ │ 86 │ │ │ │ │ self._entity_cache.add(result) │ │ 87 │ │ │ │ │ return result │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ TimedOutError: RPCError -503: Timedout (caused by GetChannelDifferenceRequest)

Lucifer-00007 commented 7 months ago

@25gabriel-cmyk @nmaiti @Matt3oV @aahnik

I am also facing exact error !

@25gabriel-cmyk have you got any solution to this error?

MobCode100 commented 7 months ago

Can this error be reproduced?

poliandro commented 7 months ago

Update Telethon to the latest version, it was fixed there.

CalbeeDaLock commented 7 months ago

Since I also run into this problem, I do "pip install --upgrade telethon" to update telethon to 1.33.0, however it show this error : ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. tgcf 1.1.8 requires Telethon==1.26.0, but you have telethon 1.33.0 which is incompatible. and it downgrade telethon back to 1.26.0 when i do "pip install --upgrade tgcf" please kindly reply if this a error or not

poliandro commented 7 months ago

After you update telethon, don't run "pip install --upgrade tgcf", because it will downgrade again telethon.

Lucifer-00007 commented 6 months ago

Update Telethon to the latest version, it was fixed there.

I am using the latest version ie. Telethon 1.33.1.

Still getting the sane error again and again. Screenshot 2023-12-17 220619 Screenshot 2023-12-17 220556 Screenshot 2023-12-17 220534 Screenshot_2023-12-16-08-23-03-839_com termux