fkalis / bash-onedrive-upload

Upload files to onedrive via linux command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code 416 - unable to upload

AllTernative90 opened this issue · comments

Hi,

I've used your newest release for a few days without problems. But since 2 days I get an error code 416 after a few chunks. Every retry fails with the same message. This happens to every big file I try to upload. Has there been any chances in the api since?

2016-04-10 02:18:10 Upload of chunk 41 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' finished (Code: 202) 2016-04-10 02:18:10 Acquiring new access token 2016-04-10 02:18:13 Uploading chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' 2016-04-10 02:18:13 Content-Length: 10158080 2016-04-10 02:18:13 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:28:34 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: ) 2016-04-10 02:28:34 Content-Length: 10158080 2016-04-10 02:28:34 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:29:20 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:29:20 Content-Length: 10158080 2016-04-10 02:29:20 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:29:40 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:29:40 Content-Length: 10158080 2016-04-10 02:29:40 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:29:59 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:29:59 Content-Length: 10158080 2016-04-10 02:29:59 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:30:17 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:30:17 Content-Length: 10158080 2016-04-10 02:30:17 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:30:37 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:30:37 Content-Length: 10158080 2016-04-10 02:30:37 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:30:56 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:30:56 Content-Length: 10158080 2016-04-10 02:30:56 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:31:14 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:31:14 Content-Length: 10158080 2016-04-10 02:31:15 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:31:33 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:31:33 Content-Length: 10158080 2016-04-10 02:31:33 Content-Range: bytes 426639360-436797439/5000000000 2016-04-10 02:31:51 Upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' finished (Code: 416) 2016-04-10 02:31:52 Retrying full upload of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: 416) 2016-04-10 02:31:52 Size of Daten_Daten_Backups_2016-04-04.part07.rar is more than 104857600 bytes, will use chunked upload 2016-04-10 02:31:52 Acquiring new access token 2016-04-10 02:31:55 Requesting upload session for '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar'

The most interesting part seems to be this line

2016-04-10 02:28:34 Retrying upload of chunk 42 of '/media/hdd/backups/Daten_Daten_Backups_2016-04-04.part07.rar' (Previous code: )

It looks as if the previous request was somehow interrupted, leaving the server in a state, where the given range of the retry does not match anymore.

I don't know how to handle this situation better than retrying the previous request or starting the whole upload of the file again.

If you have any idea, what might cause this problem, I'm happy to implement a workaround/fix. But for now your problem leaves me clueless.

I have set retries of chunks to 3 as well as retries of uploads. After I get this error all following retries (chunks and entire uploads) fail with the same code.
I experienced this for days and numerous uploads. After rebooting my device I managed to get it working for today, very strange.

This issue can be closed, I fear it's my device messing with me, not your script.

Thanks for your support!