Open Fabian42 opened 6 years ago
The first sync should definitely be into a fresh, empty folder.
As to the invalid requests: The error occurs while downloading a file, which is a very simple API request. The only parameter that is given is the file ID, which is obtained directly from the API, so I don't see how the request could contain an error.
Did you change the default file size limit and is this error reproducible for you? You may want to try using the development branch of this repository, which includes a more recent google api version.
Maybe it's a file that Google Drive thinks is malware? The malware scanner of Google Drive is so paranoid that I have accumulated at least four haress files that it thinks to be malware.
I started with an empty folder now and most files were downloaded, but some also remotely deleted. Why?
I would expect any malware filter to work on uploading files, not downloading them, but who knows... It would probably be helpful to know which file is causing the invalid request. To check this, you could insert
puts "Trying to download #{file.id} / #{file.path}..."
into line 91 of src/drive_manager.rb (in the download method, before the @service.get_file line).
If files are deleted remotely, there is likely something wrong with your manifest file (due to cancelled syncs, in your case). I would recommend a hard reset, using
ruby drivesync.rb reset
This will delete the manifest, your local drive folder and ask you to re-authorize the next time you use drivesync.
I did the reset and the code change, now it outputs a lot of "Trying to download
Update: On a new system, I ran Drivesync in a VM. Still Debian, most things the same. The "Invalid request" error happens consistently on this file: https://drive.google.com/open?id=0B1pVA4gNoJi3d2FxNTJmWWR5VFU
(I hope I'm allowed to share it, it probably doesn't run without the rest of the program data anyway.)
The file is created with 0 Bytes, then that error happens and the file is neiter deleted, nor filled. The file is not marked as malware by Google Drive. I had issues with a different program with files that Google Drive thought were malware, but that file isn't it. Drivesync seems to download those "malware" files without problem, which I think might be against TOS (the user has to do something manually to allow downloading files like that), but I won't complain. Drivesync has also downloaded some other .exe files just fine. But it failed on this one twice now.
I've tried multiple times now to use this program, but when I use an already filled, but slightly outdated local Google Drive folder as the path to sync to, it thinks that that is the latest state and starts deleting files remotely. But when I start with an empty folder, then it downloads for a while, last time it was 2-3 hours, then gives the following error message:
When I then try to start the program again, it starts deleting files remotely, because it thinks that the local folder is correct.