alfem/telegram-download-daemon

telethon.network.mtprotostate:Server sent a very new message with ID xyz

Opened this issue · 3 comments

Issue Description:

I am encountering an issue with the telegram-download-daemon Docker container that is part of my Docker Compose setup. The container works for several weeks but eventually stops functioning.

Error Messages:

[WARNING/2023-11-26 14:08:13,523]telethon.network.mtprotosender:Attempt 1 at connecting failed: TimeoutError: 
[WARNING/2023-11-26 14:08:24,535]telethon.network.mtprotosender:Attempt 2 at connecting failed: TimeoutError: 
[WARNING/2023-11-26 14:08:26,272]telethon.network.mtprotostate:Server sent a very new message with ID 1234567890123456789, ignoring (see FAQ for details)
[WARNING/2023-11-26 14:08:26,285]telethon.network.mtprotostate:Server sent a very new message with ID 9876543210987654321, ignoring (see FAQ for details)

Additional Context:

I have this Docker container integrated into a Docker Compose file alongside gluetun, aria2pro, and ariaNG. I've attempted to run the container interactively using the command docker-compose run --rm telegram-download-daemon and have successfully completed the interaction part. However, the container stops working after some time.

Steps to Reproduce:

Run the docker-compose run --rm telegram-download-daemon interactively.
press ctrl-c to stop it and then enter docker-compose up -d

Environment:

Docker version: Docker version 24.0.2, build cb74dfc
Docker Compose version: Docker Compose version v2.18.1
Operating System: PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"

Additional Question:

I have a question regarding the interaction with the telegram-download-daemon container. If you create a bot using BotFather and make the bot an admin of your channel, can you use the bot token ID instead of your telephone number? If this is possible, it seems that the interaction part may no longer be necessary. Specifically, I'm interested in whether it's feasible to pass the Telegram bot token ID as an environment variable and thus bypass the need for any manual interaction.

Best Regards,
Shahram

How long do you mean with "the container stops working after some time"?

I also need some more info about your setup. Where are you running your containers? Windows? NAS?

About you additional question, I am afraid bots are limited by Telegram, and they can not download big files. That is the main reason I built this 'daemon' to replace my old telegram-downloader-bot

It typically lasts for around 2 or 3 weeks. I don't engage with the daemon on a daily basis, and after a while, when I attempt to send a file to the channel, I notice it's unresponsive. Currently, I'm facing difficulties even starting it within the Docker Compose environment alongside other containers.

My Docker engine is running on a Debian 12 virtual machine, which runs on Proxmox 8.0.4. (it runs on a VM not lxc)

I had the idea that if I designate the bot as an admin of the channel and then input the bot token ID during the interaction, it might function similarly to when I enter my telephone number and verify it.

Best regards, Shahram

I think your platform is not promptly providing enought resources to the daemon container. I would check proxmox settings related to resource assignation.