Failed to sync: failed to open source object: bad response: 403: 403 Forbidden

Hello. I’m using rclone with G Suite to sync from G Suite to my local drive. I’m using my own client ID and secret.

I don’t have that many files in G Suite, and when I sync them down, everything works as expected except one file. I get the error

Failed to sync: failed to open source object: bad response: 403: 403 Forbidden

for this file. If I copy the file, I get the error for both copies. If I copy another file in the same dir, it downloads fine. There seems to be something about this file that will not download with rclone. The file is a ‘Slides’ file, and I can download it manually from the G Suite web page, which turns it into a PowerPoint file. There are other Slides files, and they are downloaded correctly with rclone.

Any ideas?

here’s the vvv verbose log:

2018/04/09 15:51:42 INFO : Local file system at /Volumes/more/g_suite: Waiting for transfers to finish
2018/04/09 15:51:52 ERROR : myfiles/test.pptx: Failed to copy: failed to open source object: bad response: 403: 403 Forbidden
2018/04/09 15:51:53 ERROR : Local file system at /Volumes/more/g_suite: not deleting files as there were IO errors
2018/04/09 15:51:53 ERROR : Local file system at /Volumes/more/g_suite: not deleting directories as there were IO errors
2018/04/09 15:51:53 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: bad response: 403: 403 Forbidden

A little more info. I narrowed it down to one image in the Slides file that is causing it not to download with rclone, but it will download from the Web. it’s the weirdest thing. Any ideas?

I need to understand what’s happening here so. The account I’m downloading is a holding tank for folks that have left my organizations, so we are archiving their data. I have no control of these files other than read permission.

That is strange - I’ve not heard of anything like that before.

I think this probably isn’t an rclone bug, rather something wrong with that document on google drive.

Or maybe that one image has sort of permissions marker in it.

What happens if you open a fresh Slides file and paste the content of the old one into it?

You could also try this

rclone -vv --dump bodies copyto drive:path/to/myfiles/test.pptx /tmp/test.pptx

This will show you the HTTP transactions that rclone is doing with google - there may be more info in there.

Thanks! The --dump really helped. Here’s the real error:

2018/04/11 11:31:42 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018/04/11 11:31:42 INFO : Local file system at /Volumes/more/g_suite2: Waiting for checks to finish
2018/04/11 11:31:42 INFO : Local file system at /Volumes/more/g_suite2: Waiting for transfers to finish
2018/04/11 11:31:42 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018/04/11 11:31:42 DEBUG : HTTP REQUEST (req 0xc420144e00)
2018/04/11 11:31:42 DEBUG : GET /drive/v3/files/xzxzxzxzxzxzx/export?mimeType=application%2Fvnd.openxmlformats-officedocument.presentationml.presentation HTTP/1.1
Host: www.googleapis.com
User-Agent: rclone/v1.40
Authorization: XXXX
Accept-Encoding: gzip

2018/04/11 11:31:42 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2018/04/11 11:31:52 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018/04/11 11:31:52 DEBUG : HTTP RESPONSE (req 0xc420144e00)
2018/04/11 11:31:52 DEBUG : HTTP/1.1 403 Forbidden
Transfer-Encoding: chunked
Alt-Svc: hq=":443"; ma=2592000; quic=51303433; quic=51303432; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v=“43,42,41,39,35”
Cache-Control: private, max-age=0
Content-Type: application/json; charset=UTF-8
Date: Wed, 11 Apr 2018 17:31:52 GMT
Expires: Wed, 11 Apr 2018 17:31:52 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block

ee
{
“error”: {
“errors”: [
{
“domain”: “global”,
“reason”: “exportSizeLimitExceeded”,
“message”: “This file is too large to be exported.”
}
],
“code”: 403,
“message”: “This file is too large to be exported.”
}
}

But here’s the error reported not he command line:
2018/04/11 11:34:41 ERROR : allan.pptx: Failed to copy: failed to open source object: bad response: 403: 403 Forbidden
2018/04/11 11:34:41 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: bad response: 403: 403 Forbidden
2018/04/11 11:34:51 ERROR : allan.pptx: Failed to copy: failed to open source object: bad response: 403: 403 Forbidden
2018/04/11 11:34:51 ERROR : Attempt 2/3 failed with 1 errors and: failed to open source object: bad response: 403: 403 Forbidden
2018/04/11 11:35:02 ERROR : allan.pptx: Failed to copy: failed to open source object: bad response: 403: 403 Forbidden
2018/04/11 11:35:02 ERROR : Attempt 3/3 failed with 1 errors and: failed to open source object: bad response: 403: 403 Forbidden

Also, I can download the file by opening the slides presentation and selecting Download as powerpoint, so G Suite is able to export it. I wonder if this is a limitation of the API?

Later today I’m going to try to download the file using the API and see if that works.

For now, a better error message from rclone would be appreciated.

more news. This appears to me a know issue with the published Google API. It can’t seem to export files larger that 5MB, might be 10MB (or some unspecific size; Google won’t say).

https://issuetracker.google.com/issues/36761333

And this might be a better (or alternative) api call for copying from G Suite:

https://docs.google.com/presentation/d/FILE_ID/export/pptx
The downside is the file time has to be known. Other files types are:
doc
txt
html
odt
pptx
odd
jpg
png
svg

plus some more for spreadsheets and drawings. Credit to https://www.labnol.org/internet/direct-links-for-google-drive/28356/

Hopefully I fixed the error message here:

https://beta.rclone.org/v1.40-065-ge82452ce-test/ (uploaded in 15-30 mins)

I’d appreciate it if you’d give it a go for me!

I wasn’t interpreting the failure code from an Open call as a google error message - now that we are it will mean that retries of Opens will work better :slight_smile:

Do you think you could make a new issue on github with the alternate export API in it and we can collaborate there - thanks!