fkalis / bash-onedrive-upload

Upload files to onedrive via linux command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when uploading big files

tiagobrc opened this issue · comments

When uploading file chunks, I receave this menssage:

No refresh token received from API. Please try again or re-authorize.

I was able to upload 1 file after try 6 times. The file have 6 GB. It appears to be caused by connection or something. There is a way to fix this ?

Since your file's size is 6 GB, the script uses the chunked upload. Between two chunks the access_token will be refreshed (and so does the refresh_token). Every access_token is usually valid for one hour, so this should not be a problem.

It might be that the throttling kicks in because of too many requests. Currently every chunk upload consists of 2 requests, so for the default settings you end up with round about 1.3k requests.

Does the upload work for you with smaller files?

Have you tried to running the script in debug mode? (./onedrive-upload -d myfile.dat)
Does it upload a few chunks before the error occurs?

commented

I have exactly the same problem. The filesize is ~8,7 GiB and there were 58 chunks that could be uploaded successfully but then there is a problem with the refresh token.

2017-03-05 14:36:35 Uploading chunk 57 of 'myfile.dat'
2017-03-05 14:36:35 Content-Length: 10158080
2017-03-05 14:36:35 Content-Range: bytes 579010560-589168639/9392167149
2017-03-05 14:36:39 Upload of chunk 57 of 'myfile.dat' finished (Code: 202)
2017-03-05 14:36:39 Acquiring new access token
2017-03-05 14:36:40 Uploading chunk 58 of 'myfile.dat'
2017-03-05 14:36:40 Content-Length: 10158080
2017-03-05 14:36:40 Content-Range: bytes 589168640-599326719/9392167149
2017-03-05 14:36:44 Upload of chunk 58 of 'myfile.dat' finished (Code: 202)
2017-03-05 14:36:44 Acquiring new access token
No refresh token received from API. Please try again or re-authorize.
An error has occurred while uploading 'myfile.dat' (Code: )

I was using the software inside a headnote in a cluster. The problem vanished after I first transferred it to the transfer server.