My existing gdrive mount has stopped working after 6months because the access token expired. I wanted to refresh the token but now the token expires after 1 hour. I followed different methods by publishing the app and then using if for rclone but nothing has worked so far. I looked already into similar threads but I haven't found any solution
Run the command 'rclone version' and share the full output of the command.
rclone v1.59.0
os/version: debian 10.10 (64 bit)
os/kernel: 4.19.0-17-amd64 (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.18.3
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone, on the fly, should refresh the token.
even if rclone is in the middle of running a command.
if you do not want to use tokens, use a service account file.
in addition, google has made some major changes to the oauth2 process,
as a result, rclone had to change.
this has been discussed a number of times in the forum, and can be seen at the rclone change log,
Unfortunately, it doesn't refresh after the hour. I always get the error that the token has expired. I will upload a log tomorrow. I tried the service account file method now but I am not sure if I have done it right.
Is any rclone action with Google Drive supposed to refresh the token? I'm running rclone on a headless remote server, so reauthorizing is a bit of a pain. When I run a simple rclone command like rclone ls drive:, I'm not seeing .config/rclone/rclone.conf get updated with a new token expiration time. Should it?
I'm wondering if the one-hour expiration can be avoided with a cron job that runs a command that refreshes a couple of times per hour, without the need for a user to be present.
Rclone should refresh the token when it has expired using the refresh token, even after it has expired. No need to poll it every hour.
If the token is expiring every hour, it is likely your rclone client_id/client_secret app is not properly configured. I forget exactly the problem, but it is something like not putting it into production.