fabianonline / telegram_backup

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

handle RPC_CALL_FAIL exceptions #67

Closed mgrandi closed 6 years ago

mgrandi commented 6 years ago

It seems the app is not handling certain exceptions which makes the app exit, which makes leaving the app download overnight not feasible: ( version 1.1.0 )


...1800...2000...2200...2400...2600...2800...3000...3200...3400...3600...3800...4000...4200...4400...4600...4800...5000...5200...5400...5600...5800...6000...6200...6400...6600...6800...7000...7200...7400...7600...7800...8000...8200...8400...8600...8800...9000...9200...9400...9600...9800...10000...10200...10400...10600...10800...11000...11200...11400...11600...11800...12000...12200...12400...12600...12800...13000...13200...13400...13600...13800...14000...14200...14400...14600...14800...15000...15200...15400

500: RPC_CALL_FAIL
    at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQueries(DefaultTelegramClient.kt:209)
    at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQueries$default(DefaultTelegramClient.kt:181)
    at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQueries(DefaultTelegramClient.kt:160)
    at com.github.badoualy.telegram.api.TelegramClient$DefaultImpls.executeRpcQuery(TelegramClient.kt:53)
    at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQuery(DefaultTelegramClient.kt:157)
    at com.github.badoualy.telegram.tl.api.TelegramApiWrapper.messagesGetMessages(TelegramApiWrapper.java:673)
    at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.java:255)
    at de.fabianonline.telegram_backup.DownloadManager._downloadMessages(DownloadManager.java:140)
    at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.java:78)
    at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.java:146)
    at de.fabianonline.telegram_backup.CommandLineRunner.main(CommandLineRunner.java:41)
----- EXIT -----
[2017-12-11 14:02:38] markgrandi@mgrandi-mbp13:~/Programs$```
runalsh commented 6 years ago

temporary ban from telegram

mgrandi commented 6 years ago

I don't think it is a temporary ban, the http code that it outputs is 500 which (if they are doing status codes correctly) means its a problem on their side. not to mention the temporary bans are the FLOOD_WAIT_X which telegram_backup already handles

fabianonline commented 6 years ago

I don't think it would be a good idea to "force" the app to continue to run. Those exceptions can only occur if something is seriously going wrong. By continuing we would risk getting corrupted data back without being able to detect it... I think under this conditions it's best to just quit and be on the safe side.