fabianonline / telegram_backup

Java app to download all your telegram data.
GNU General Public License v3.0
450 stars 91 forks source link

Download stalls if specific file download times out regularly #39

Closed fabianonline closed 6 years ago

fabianonline commented 7 years ago

Via email:

But at that time I had huge amount of telegram messages and transported media... so It taked 5 hours to backup messages, (with millions of number counted...) and soon started media backup. (Note: I have understand how your app work as 'first, message backup. second, media backup')

But as soon as that process started, such messages appeared on the terminal.

########### Checking and downloading media. Legend: 'V' - Video 'P' - Photo 'D' - Document 'S' - Sticker 'A' - Audio 'G' - Geolocation '.' - Previously downloaded file 'e' - Empty file ' ' - Ignored media type (weblinks or contacts, for example) 15265 Files to check / download ...................................................Exception in thread "MTProtoWatchdog-exec-thread-128" java.lang.Error: java.nio.channels.ClosedChannelException at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148) at [....] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ... 2 more

Telegram took too long to respond to our request. I'm going to wait a minute and then try again. ############

fabianonline commented 7 years ago

After looking deeply into the code I'm fairly certain that this timeout exception should never be able to happen. Ummmm. Great.

fabianonline commented 7 years ago

I added a bit more debugging to 1.0.6. Running it with --tracecould help. Let's see... (I'll also send a mail to the reporter.)

birdie-github commented 7 years ago
DDPPException in thread "MTProtoWatchdog-exec-thread-1" java.lang.Error: java.nio.channels.ClosedChannelException
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.ClosedChannelException
        at java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(Unknown Source)
        at com.github.badoualy.telegram.mtproto.transport.MTProtoTcpConnection.unregister(MTProtoTcpConnection.kt:120)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog.stop(MTProtoWatchdog.kt:132)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog$run$2$1$1.run(MTProtoWatchdog.kt:63)
        ... 3 more
Exception in thread "MTProtoWatchdog-exec-thread-3" java.lang.Error: java.nio.channels.ClosedChannelException
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.ClosedChannelException
        at java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(Unknown Source)
        at com.github.badoualy.telegram.mtproto.transport.MTProtoTcpConnection.unregister(MTProtoTcpConnection.kt:120)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog.stop(MTProtoWatchdog.kt:132)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog$run$2$1$1.run(MTProtoWatchdog.kt:63)
        ... 3 more
DD  PDPP Exception in thread "MTProtoWatchdog-exec-thread-4" java.lang.Error: java.nio.channels.ClosedChannelException
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.ClosedChannelException
        at java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(Unknown Source)
        at com.github.badoualy.telegram.mtproto.transport.MTProtoTcpConnection.unregister(MTProtoTcpConnection.kt:120)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog.stop(MTProtoWatchdog.kt:132)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog$run$2$1$1.run(MTProtoWatchdog.kt:63)
        ... 3 more
Exception in thread "MTProtoWatchdog-exec-thread-5" java.lang.Error: java.nio.channels.ClosedChannelException
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.ClosedChannelException
        at java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(Unknown Source)
        at com.github.badoualy.telegram.mtproto.transport.MTProtoTcpConnection.unregister(MTProtoTcpConnection.kt:120)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog.stop(MTProtoWatchdog.kt:132)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog$run$2$1$1.run(MTProtoWatchdog.kt:63)
        ... 3 more
Exception in thread "MTProtoWatchdog-exec-thread-6" java.lang.Error: java.nio.channels.ClosedChannelException
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.ClosedChannelException
        at java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(Unknown Source)
        at com.github.badoualy.telegram.mtproto.transport.MTProtoTcpConnection.unregister(MTProtoTcpConnection.kt:120)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog.stop(MTProtoWatchdog.kt:132)
        at com.github.badoualy.telegram.mtproto.MTProtoWatchdog$run$2$1$1.run(MTProtoWatchdog.kt:63)
        ... 3 more
birdie-github commented 7 years ago

Actually despite all these error messages all the files have been downloaded. I'm not sure if they are byte perfect though.

fabianonline commented 6 years ago

The bug was fixed and I can't do anything against these error messages.