Google Drive Token refresh failed

I may be zeroing in on something.

So my mount started showing the token refresh failures in the typical pattern: failure 5 times, wait 1 minute, repeat. While it was still in this failure pattern, I started a manual rclone copy and then the mount log showed that it loaded a fresh token from config file.

Perhaps there is some difference in the code between the mount and copy to refresh the token. In fact I have never had a problem with a copy, only in a mount.

Interesting...

The problem there has to be the "context canceled"... Why is the burning question.

Ah, I think I understand what is happening.

When the backend is created, the context from the rc call is being passed to it. This gets cancelled at the end of the rc request which means that the token refresher thinks its context has been cancelled too and refuses to do anything.

I've attempted to fix this here - can you give it a try?

v1.55.0-beta.5216.e556df071.fix-backend-cancel-context on branch fix-backend-cancel-context (uploaded in 15-30 mins)

This bit of code got re-worked in the beta so if that works, I'll backport it to the stable branch and get you to test that as well.

I don't see any linux versions listed.

Sorry, the build failed. I've kicked it off again - hopefully it will work this time!

I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.55

Sorry I never got back to try to verify this fix. I switched my mount/unmount scripts to use the standard rclone mount instead of the rc call and it was working fine, so I left it at that.

1 Like

This error started to occur at the beginning of the year ...

before, the validity of the 0auth2 token was not so short.

Google support says that the problem is with RClone that it should automatically revalidate the token and that they have no way of modifying it because the token is generated by RClone.

And here on the RClone forum they informed me they gave me a run around ....

What error you are talking about?

That's how the tokens work as they refresh automatically by rclone.

Not following as you seem to have hijacked someone else's post? If you want to post a question, we're happy to help.

this error

Failed to sync: couldn't list directory: Get "<>": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect ID:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}

yes, i see this post and reply because i have a similar problem...and you answer me...

Do i have to make a new post?

I'm a nice guy at heart so I try to be helpful.

Yes as all the information needed to help you out is not shared. The help and support template collects all that.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.