axzxc1236 / Rclone_Gdrive_public_folder_automation

Batch copy Google Drive shared folder, automated.
MIT License
14 stars 3 forks source link

Rclone shows error message when token needs to update. #1

Open axzxc1236 opened 5 years ago

axzxc1236 commented 5 years ago

Here is how the script works (now):

It copies original config file and adds a remote named "tmp" to access public Google Drive folder.

The issue happens because your Google Drive token expires every hour and requires renewal, and rclone only applies new token to the Google Drive remote you created, "tmp:" still gets the old one.

It's a issue when you share a token between gdrive remote and tmp remote, and you are copying from public folder to gdrive remote or encrypt_gdrive remote.

The workaround... https://github.com/axzxc1236/Rclone_Gdrive_public_folder_automation/commit/f2e9f0669293391194496b3dd21459347501d3ac

I decided when the script detects rclone exit with error, it retries once, that should make a new modified config with new token applies to both Google Drive remotes.

Script users will still see error messages and panic...

Eliminate the error?

rclone needs a way to share tokens between two Google Drive remotes in the config file.

Or maybe a way to access public Google Drive folder without a token. (I tried, it needs a token)

axzxc1236 commented 5 years ago

I now realize the amount of retries will become a problem when you have slow internet (relatively) that isn't able to copy a large Google Drive folder within two tries.....

For those who has the concern, crank up amounts_of_retries_before_giveup in app.js.