gurland / telegram-delete-all-messages

Delete all your messages in groups / supergroups using this python script
GNU General Public License v3.0
373 stars 90 forks source link

pyrogram.errors.BadMsgNotification: [16] The msg_id is too low, the client time has to be synchronized. #80

Open tunlong opened 2 weeks ago

tunlong commented 2 weeks ago

I could not use the app any more with this error message.

pyrogram.errors.BadMsgNotification: [16] The msg_id is too low, the client time has to be synchronized.

tunlong commented 2 weeks ago

Full log:

Traceback (most recent call last): File "/home/ubuntu/telegram-delete-all-messages/cleaner.py", line 27, in app.start() File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/sync.py", line 51, in async_to_sync_wrap return loop.run_until_complete(coroutine) File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/methods/utilities/start.py", line 52, in start is_authorized = await self.connect() File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/methods/auth/connect.py", line 46, in connect await self.session.start() File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/session/session.py", line 142, in start raise e File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/session/session.py", line 109, in start await self._send(raw.functions.Ping(ping_id=0), timeout=self.START_TIMEOUT) File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/session/session.py", line 334, in _send raise BadMsgNotification(result.error_code) pyrogram.errors.BadMsgNotification: [16] The msg_id is too low, the client time has to be synchronized.

barriejos commented 2 weeks ago

I have the same issue.

Log: Traceback (most recent call last): File "C:\Users\user\Desktop\telegram-delete-all-messages-master\cleaner.py", line 27, in app.start() File "C:\Users\user\Desktop\telegram-delete-all-messages-master\venv\Lib\site-packages\pyrogram\sync.py", line 51, in async_to_sync_wrap return loop.run_until_complete(coroutine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python312\Lib\asyncio\base_events.py", line 685, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\user\Desktop\telegram-delete-all-messages-master\venv\Lib\site-packages\pyrogram\methods\utilities\start.py", line 52, in start is_authorized = await self.connect() ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\Desktop\telegram-delete-all-messages-master\venv\Lib\site-packages\pyrogram\methods\auth\connect.py", line 46, in connect await self.session.start() File "C:\Users\user\Desktop\telegram-delete-all-messages-master\venv\Lib\site-packages\pyrogram\session\session.py", line 142, in start raise e File "C:\Users\user\Desktop\telegram-delete-all-messages-master\venv\Lib\site-packages\pyrogram\session\session.py", line 109, in start await self._send(raw.functions.Ping(ping_id=0), timeout=self.START_TIMEOUT) File "C:\Users\user\Desktop\telegram-delete-all-messages-master\venv\Lib\site-packages\pyrogram\session\session.py", line 334, in _send raise BadMsgNotification(result.error_code) pyrogram.errors.BadMsgNotification: [16] The msg_id is too low, the client time has to be synchronized.

barriejos commented 2 weeks ago

Going down this rabbit hole fixed the issue for me: #76 #70

tunlong commented 2 weeks ago

Going down this rabbit hole fixed the issue for me: #76 #70

Hi, I edit the requirements.txt with pyrogram==2.0.106 and replace cleaner.py with https://github.com/gurland/telegram-delete-all-messages/issues/70, but get below error

Traceback (most recent call last): File "/home/ubuntu/telegram-delete-all-messages/cleaner.py", line 160, in deleter.select_groups() File "/home/ubuntu/telegram-delete-all-messages/cleaner.py", line 69, in select_groups chats = self.get_all_chats() File "/home/ubuntu/telegram-delete-all-messages/cleaner.py", line 66, in get_all_chats return [d.chat for d in dialogs] File "/home/ubuntu/telegram-delete-all-messages/cleaner.py", line 66, in return [d.chat for d in dialogs] File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/sync.py", line 42, in async_to_sync_gen item, done = loop.run_until_complete(anext(agen)) File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/sync.py", line 36, in anext return await agen.anext(), False File "/home/ubuntu/.local/lib/python3.10/site-packages/pyrogram/methods/chats/get_dialogs.py", line 94, in get_dialogs offset_id = last.top_message.id