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

Could not find a matching Constructor ID for the TLObject that was supposed to be read with ID 83314fca #4566

Open
3 tasks done
djhmateer opened this issue Feb 28, 2025 · 2 comments

Comments

@djhmateer
Copy link

djhmateer commented Feb 28, 2025

Code that causes the issue

with self.client.start():

Expected behavior

I was trying to start the client.

Actual behavior

I got this exception:

Caught exception starting telethonclient: Could not find a matching Constructor ID for the TLObject that was supposed to be read with ID 83314fca. See the FAQ for more details. Remaining bytes: b'\xcaO1\x83W\x0c\x00\x02\x10\x00\x00\x00\x06R\x8c\x88\x01\x00\x00\x00H\xbb\xc4+\x11\xf8^\x9f\REDACTED\x00\x00\x00\REDACTED\x00\x0c447584126022\x00\x00\x00?p\x8c\x00\xb1\x97\REDACTED\xd3\xeb\xad\xd0\xd5\x86<x\xf6\xab5\x92\x9d\xc1\x1d\x9cO\xb1\REDACTED\x8do\xdb\xa9\x1a'

Traceback

No response

Telethon version

1.39.0

Python version

3.10.12

Operating system (including distribution name and version)

Ubuntu 22.04 LTS

Other details

I've only got the problem on all 5 of my Ubuntu 22 servers, not Windows dev machine.

It is intermittent.

With a retry it can recover eg:

        try_again = True
        retries = 1
        while try_again:
            if retries > 10:
                message = f"Failed to start telethon client after {retries} retries"
                logger.error(message)
                raise Exception(message)
            try:    
                with self.client.start():
                    logger.debug(f"SETUP telethon_archiver login works.")
                    try_again = False
            except Exception as e:
                logger.error(f"Caught exception starting telethonclient: {e}")
                logger.info(f"sleeping for {5 * retries} seconds before retrying")
                time.sleep(5 * retries)
                retries += 1

Checklist

  • The error is in the library's code, and not in my own.
  • I have searched for this issue before posting it and there isn't an open duplicate.
  • I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
@Lonami
Copy link
Member

Lonami commented Feb 28, 2025

If https://docs.telethon.dev/en/stable/quick-references/faq.html#what-does-could-not-find-a-matching-constructor-id-for-the-tlobject-mean is not the cause, Telegram may have changed the layer without increasing the number, where the only solution is to downgrade or wait for the new changes to be available.

@djhmateer
Copy link
Author

Thank you @Lonami - will try the downgrade trick. Also much appreciated for the link, as I do use the same session across multi servers which has worked for years, but maybe now is causing a problem.

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