tdlib / td

Cross-platform library for building Telegram clients

Home Page:https://core.telegram.org/tdlib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Download file getting Error 400: File download has failed or was canceled

henriquelaporta opened this issue · comments

I have set up 2 different accounts using tdlight/td.
They are running on two different servers and having the same issue when trying to download different files.

it.tdlight.client.TelegramError: 400: File download has failed or was canceled
	at it.tdlight.client.Result.get(Result.java:36)

I changed the log verbosity and this appears on the attempt to download the file:

[FileManager.cpp:2386][#1][!FileManager]	Need to redownload file {id}(0): [Error : 400 : Can't find real file path]

This is not the error you are looking for, but the actual error should be also logged with verbosity level 2.

@levlam Thank you for the fast reply.

Yeah, I've tried logged with verbosity level 2, but didn't find anything interesting.

So I'm downloading the file in parts each one with a max of 10 Mb. The problem is happening because these 10 Mb parts are taking too much time to download like +1 minute. The request gets a timeout from my side.

If we think about files of up to 4Gb that can take hours (even if a let the download runs without closing)

I understand that can be not related to the lib itself, but is unusable because I have the code running for years and never took time to download just 10 Mb. Using an instance with up to 5 Gb of bandwidth this is odd, also I'm not downloading other files or parts in parallel.

Do you have some idea or reason that could start happening right now?

If download speed has dropped, then this is likely caused by Internet data links being overloaded.