Update to v1.56.0 to fix: googleapi: Error 403: Only files with binary content can be downloaded #5455
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rclone |
Fix Released
|
Undecided
|
Unassigned | ||
rclone (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
Bionic |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
Focal |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
Impish |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
Jammy |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
[Impact]
When using rclone to download or sync a google drive native file, like a google doc, it will fail with a generic 403 permission denied problem.
[Test Plan]
Setup rclone to access google drive. The steps are not straightforward unfortunately, but are described in detail here: https:/
Then either sync all of the drive, or a folder that contains a native google doc file. For example, to sync the entire google drive remote, if it's called "mygdrive":
rclone sync -v mydrive: ./target
Versions with the bug will yield a message like this when trying to fetch the google doc:
2022/03/29 19:29:32 ERROR : somefile: Failed to copy: failed to open source object: open file failed: googleapi: Error 403: Only files with binary content can be downloaded. Use Export with Docs Editors files., fileNotDownloadable
Bionic, with an older version, has a slightly different error message:
2022/03/29 19:16:17 ERROR : somefile: Failed to copy: failed to open source object: forbidden to download - check sharing permission
The fixed version will download those files without that error.
[Where problems could occur]
In the patch, the method used to identify what is a google doc file and what isn't seems flimsy: "google docs are identified solely by not having an MD5 checksum." I checked current git tip and the applied patch wasn't changed or reverted.
This file type check determines which download method is used, and if there are other files that match this check but require yet another way to download them, this could fail again in the future.
Something else that occurred to me is if there remains some google api endpoint which hasn't made this api change yet, if that would fail with the new rclone package. Seems unlikely after all this time (this bug is from july 2021), but I have no data to back that up other than my own testing with my own gdrive account.
[Other Info]
At one point while testing the bionic version, I was getting panics from rclone. I then reverted to the original bionic version, and still got a panic. After a while, both original, and patched versions, decided to work. My assumption is that there was some random network error, or maybe a google api response, that the bionic version didn't know how to handle, and crashed. Since it also happened with the rclone version as released with bionic, I don't think it's related to this fix.
[Original Description]
rclone version v1.56.0 (or at least, a beta release of that version) is required to fix rclone to adapt to a recent change in the Google Drive API. Older versions, such as the currently packaged 1.50.2-2 on focal, fail with the following error on some files:
ERROR : ...filename...: Failed to copy: failed to open source object: open file failed: googleapi: Error 403: Only files with binary content can be downloaded. Use Export with Docs Editors files., fileNotDownloadable
Reference: Upstream bug: https:/
Related branches
- Lucas Kanashiro (community): Approve
- Canonical Server: Pending requested
-
Diff: 88 lines (+54/-1)4 files modifieddebian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/0008-fix-gdrive-download.patch (+43/-0)
debian/patches/series (+1/-0)
- Lucas Kanashiro (community): Approve
- Canonical Server: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 107 lines (+66/-1)4 files modifieddebian/changelog (+10/-0)
debian/control (+3/-1)
debian/patches/0008-fix-gdrive-download.patch (+52/-0)
debian/patches/series (+1/-0)
- Lucas Kanashiro (community): Approve
- Canonical Server: Pending requested
-
Diff: 100 lines (+63/-1)4 files modifieddebian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/0008-fix-gdrive-download.patch (+52/-0)
debian/patches/series (+1/-0)
- Lucas Kanashiro (community): Approve
- Canonical Server: Pending requested
-
Diff: 100 lines (+63/-1)4 files modifieddebian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/0008-fix-gdrive-download.patch (+52/-0)
debian/patches/series (+1/-0)
affects: | rclone (Ubuntu) → rclone |
Changed in rclone (Ubuntu Bionic): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | New → In Progress |
description: | updated |
description: | updated |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.