mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Update FAQ
This commit is contained in:
parent
f9001bc8e0
commit
3e64ea35ff
|
@ -178,6 +178,43 @@ won't do unnecessary work unless you need to:
|
||||||
sender = await event.get_sender()
|
sender = await event.get_sender()
|
||||||
|
|
||||||
|
|
||||||
|
What does "Server sent a very new message with ID" mean?
|
||||||
|
========================================================
|
||||||
|
|
||||||
|
You may also see this error as "Server sent a very old message with ID".
|
||||||
|
|
||||||
|
This is a security feature from Telethon that cannot be disabled and is
|
||||||
|
meant to protect you against replay attacks.
|
||||||
|
|
||||||
|
When this message is incorrectly reported as a "bug",
|
||||||
|
the most common patterns seem to be:
|
||||||
|
|
||||||
|
* Your system time is incorrect.
|
||||||
|
* The proxy you're using may be interfering somehow.
|
||||||
|
* The Telethon session is being used or has been used from somewhere else.
|
||||||
|
Make sure that you created the session from Telethon, and are not using the
|
||||||
|
same session anywhere else. If you need to use the same account from
|
||||||
|
multiple places, login and use a different session for each place you need.
|
||||||
|
|
||||||
|
|
||||||
|
What does "Could not find a matching Constructor ID for the TLObject" mean?
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
Telegram uses "layers", which you can think of as "versions" of the API they
|
||||||
|
offer. When Telethon reads responses that the Telegram servers send, these
|
||||||
|
need to be deserialized (into what Telethon calls "TLObjects").
|
||||||
|
|
||||||
|
Every Telethon version understands a single Telegram layer. When Telethon
|
||||||
|
connects to Telegram, both agree on the layer to use. If the layers don't
|
||||||
|
match, Telegram may send certain objects which Telethon no longer understands.
|
||||||
|
|
||||||
|
When this message is reported as a "bug", the most common patterns seem to be
|
||||||
|
that he Telethon session is being used or has been used from somewhere else.
|
||||||
|
Make sure that you created the session from Telethon, and are not using the
|
||||||
|
same session anywhere else. If you need to use the same account from
|
||||||
|
multiple places, login and use a different session for each place you need.
|
||||||
|
|
||||||
|
|
||||||
What does "bases ChatGetter" mean?
|
What does "bases ChatGetter" mean?
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ class TypeNotFoundError(Exception):
|
||||||
def __init__(self, invalid_constructor_id, remaining):
|
def __init__(self, invalid_constructor_id, remaining):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
'Could not find a matching Constructor ID for the TLObject '
|
'Could not find a matching Constructor ID for the TLObject '
|
||||||
'that was supposed to be read with ID {:08x}. Most likely, '
|
'that was supposed to be read with ID {:08x}. See the FAQ '
|
||||||
'a TLObject was trying to be read when it should not be read. '
|
'for more details. '
|
||||||
'Remaining bytes: {!r}'.format(invalid_constructor_id, remaining))
|
'Remaining bytes: {!r}'.format(invalid_constructor_id, remaining))
|
||||||
|
|
||||||
self.invalid_constructor_id = invalid_constructor_id
|
self.invalid_constructor_id = invalid_constructor_id
|
||||||
|
|
|
@ -208,12 +208,12 @@ class MTProtoState:
|
||||||
time_delta = now - remote_msg_time
|
time_delta = now - remote_msg_time
|
||||||
|
|
||||||
if time_delta > MSG_TOO_OLD_DELTA:
|
if time_delta > MSG_TOO_OLD_DELTA:
|
||||||
self._log.warning('Server sent a very old message with ID %d, ignoring', remote_msg_id)
|
self._log.warning('Server sent a very old message with ID %d, ignoring (see FAQ for details)', remote_msg_id)
|
||||||
self._count_ignored()
|
self._count_ignored()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if -time_delta > MSG_TOO_NEW_DELTA:
|
if -time_delta > MSG_TOO_NEW_DELTA:
|
||||||
self._log.warning('Server sent a very new message with ID %d, ignoring', remote_msg_id)
|
self._log.warning('Server sent a very new message with ID %d, ignoring (see FAQ for details)', remote_msg_id)
|
||||||
self._count_ignored()
|
self._count_ignored()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user