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.
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?
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.
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 ....