fabianonline/telegram_backup

403 Error while downloading media.

Closed this issue · 6 comments

When downloading media I get stuck at a specific file with the following error message:

java.io.IOException: Server returned HTTP response code: 403 for URL: https://maps.googleapis.com/maps/api/staticmap?center=48.29162205243369,16.708328075431293&zoom=14&size=300x150&scale=2&format=png&key=AIzaSyBEtUDhCQKEH6i2Mn1GAiQ9M_tLN0vxHIs
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1489)
        at de.fabianonline.telegram_backup.DownloadManager.downloadExternalFile(DownloadManager.java:468)
        at de.fabianonline.telegram_backup.mediafilemanager.GeoFileManager.download(GeoFileManager.java:76)
        at de.fabianonline.telegram_backup.DownloadManager._downloadMedia(DownloadManager.java:341)
        at de.fabianonline.telegram_backup.DownloadManager.downloadMedia(DownloadManager.java:294)
        at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.java:151)
        at de.fabianonline.telegram_backup.CommandLineRunner.main(CommandLineRunner.java:41)

----- EXIT -----

Is it possible to manually skip/ignore the file, so I can download the rest?

The same issue occurred also for me:/

I confirm, the same issue occurred :-(

Yep, someone is doing weird stuff with the GMaps API access key, leading to those requests failing with an error 403. The next version (which is mostly finished) will contain a new API key (to restore the Maps download feature) and won't fail on these errors.

You can skip those downloads: Run the tool with '--debug' or even '--trace', find the filename it is trying to download the file to and create an empty file with that name.

Ok, could you tell me please, where to find the filename? With the --debug option I get similar output as above, but I don't see there any filename there :-(

Try it with --trace there should be a line like this bevor the error message
P21:41:59.560 TRACE DownloadManager._downloadMedia : message 166560, àGeo, GeoFileManager, non-empty, not downloaded
In this case you would have to create a file named 166560.png

Prefect, it worked!
Thank you :-)