MStadlmeier / drivesync

Google Drive synchronization for Linux
MIT License
197 stars 26 forks source link

Suddenly `check_status': notFound: File not found #25

Closed FedericoHeichou closed 5 years ago

FedericoHeichou commented 5 years ago

I saw that the script doesn't sync anymore files. I noticed that it keep running background using a lot of CPU (around 50-100% of my raspberry) then it stops after 1 minute (some times 3-4 minutes) without give any error or printing some info about sync. I thought the authorization was broken and it keep retrying to connect to the google's api. I removed the ~/.credentials/drivesync.yaml and created a new authorization token, but now I got this error:

/var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:218:in `check_status': notFound: File not found: 1QyyQUEJnFpY9dUUnCENSORED. (Google::Apis::ClientError)
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/api_command.rb:116:in `check_status'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:183:in `process_response'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:299:in `execute_once'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:104:in `block (2 levels) in execute'
    from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
    from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
    from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:101:in `block in execute'
    from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
    from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
    from /var/lib/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/http_command.rb:93:in `execute'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
    from /var/lib/gems/2.3.0/gems/google-api-client-0.23.4/generated/google/apis/drive_v3/service.rb:792:in `get_file'
    from /opt/drivesync/src/drive_manager.rb:152:in `get_folder'
    from /opt/drivesync/src/drive_manager.rb:142:in `resolve_path'
    from /opt/drivesync/src/drive_manager.rb:87:in `block in get_files'
    from /opt/drivesync/src/drive_manager.rb:87:in `each'
    from /opt/drivesync/src/drive_manager.rb:87:in `get_files'
    from /opt/drivesync/src/synchronizer.rb:85:in `get_files'
    from /opt/drivesync/src/synchronizer.rb:66:in `run'
    from /opt/drivesync/drivesync.rb:23:in `sync'
    from /opt/drivesync/drivesync.rb:64:in `<main>'

Is this a problem of google's api?

MStadlmeier commented 5 years ago

@FedericoHeichou Have you tried running ruby drivesync.rb reset ? This will delete the local drive folder, the sync manifest and authorization. Afterwards you can re-authorize and have a clean slate.

FedericoHeichou commented 5 years ago

Yes I did it. In these days I will retry, maybe it was a Google's problem. I will let you know

MStadlmeier commented 5 years ago

Looks like the API is looking for a folder which doesn't exist. I don't see how DriveSync itself could cause this, but if it does, it would have to be fixed by a total reset. If you do try to reset again, make sure that both the manifest and authorization files have actually been deleted (DriveSync will tell you their paths during the reset process).

If the issue persists, let me know.

FedericoHeichou commented 5 years ago

Suddenly (I did nothing) it seems it works again. It was a Google's problem as I thought. Thank you very much, I will monitor tomorrow too and then if it works I'll close this issue.