Skip to content
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

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

Open
tunlong opened this issue Oct 19, 2024 · 4 comments

Comments

@tunlong
Copy link

tunlong commented Oct 19, 2024

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
Copy link
Author

tunlong commented Oct 19, 2024

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
Copy link

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
Copy link

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

@tunlong
Copy link
Author

tunlong commented Oct 20, 2024

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 #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants