rclone: Version 1.59.1: Jottacloud still problems with the validity of the auth token - stale token
The associated forum post URL from https://forum.rclone.org
This might be connected with https://github.com/rclone/rclone/issues/6309
What is the problem you are having with rclone?
rclone reports “stale token”. After setup (after selfupdate to the latest version) or editing of an existing config rclone works for ~ 1 day perfectly. The next night (I do my backups with it from a machine from the local network to Jottacloud) it breaks due to “stale token”
When looking to the config section in rclone.conf for this I can see that rclone or Jottacloud API seems to set a kind of expiry date:
[jotta_archive] type = jottacloud configVersion = 1 client_id = jottacli client_secret = tokenURL = https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token token = {“access_token”:“[REDACTED]”,“expiry”:“2022-08-09T09:51:11.367124042+02:00”}
From my point of view what we see at the end of token is more the date when the token was requested, then the expiry date.
I also opened (a few weeks ago) a support ticket with Jottacloud and they explained that once a token is generated there is no expiry date for the token. According to the support such token will simply be valid forever or the user generates a new AUTH Token from the webfronted.
As they are very very reluctant concerning 3rd party tools like rclone it is not easy to discuss with them issues that might be a problem with there API used for generating AUTH TOKENs. [No there is no issue with our API] It might (my personal assumption and no blaming at all) also that they do not want 3rd party tools to be used with their cloud storage, as they provide jottacloud-cli.
Therefore it would be highly appreciated from my side if someone of the developers could take a look into that, because I really love to use rclone for backing up my stuff.
Therefore again my assumption (due to the facts/ behaviour) I encountered:
Neither the answer to the Jotta AUTH API is being misinterpreted by rclone (the message below [see -vv section] Loaded invalid token from config file is making me worried) nor Jottacloud might have issues with their API (or do not like 3rd party tools to be used with their service)
Thank you for the tool and for looking into it.
What is your rclone version (output from rclone version)
rclone v1.59.1
- os/version: debian 11.4 (64 bit)
- os/kernel: 5.10.0-16-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.5
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
Debian 11.4 x64 Windows 11
Which cloud storage system are you using? (e.g. Google Drive)
Jottacloud
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
rclone lsd jotta_archive:
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
2022/08/10 09:02:28 DEBUG : rclone: Version “v1.59.1” starting with parameters [“rclone” “lsd” “jotta_archive:” “-vv”] 2022/08/10 09:02:28 DEBUG : Creating backend with remote “jotta_archive:” 2022/08/10 09:02:28 DEBUG : Using config file from “/root/.config/rclone/rclone.conf” 2022/08/10 09:02:28 DEBUG : jotta_archive: Loaded invalid token from config file - ignoring 2022/08/10 09:02:28 DEBUG : jotta_archive: Token refresh failed try 1/5: oauth2: cannot fetch token: 400 Bad Request Response: {“error”:“invalid_grant”,“error_description”:“Stale token”} 2022/08/10 09:02:29 DEBUG : jotta_archive: Loaded invalid token from config file - ignoring 2022/08/10 09:02:29 DEBUG : jotta_archive: Token refresh failed try 2/5: oauth2: cannot fetch token: 400 Bad Request Response: {“error”:“invalid_grant”,“error_description”:“Stale token”} 2022/08/10 09:02:30 DEBUG : jotta_archive: Loaded invalid token from config file - ignoring 2022/08/10 09:02:30 DEBUG : jotta_archive: Token refresh failed try 3/5: oauth2: cannot fetch token: 400 Bad Request Response: {“error”:“invalid_grant”,“error_description”:“Stale token”} 2022/08/10 09:02:31 DEBUG : jotta_archive: Loaded invalid token from config file - ignoring 2022/08/10 09:02:31 DEBUG : jotta_archive: Token refresh failed try 4/5: oauth2: cannot fetch token: 400 Bad Request Response: {“error”:“invalid_grant”,“error_description”:“Stale token”} 2022/08/10 09:02:32 DEBUG : jotta_archive: Loaded invalid token from config file - ignoring 2022/08/10 09:02:32 DEBUG : jotta_archive: Token refresh failed try 5/5: oauth2: cannot fetch token: 400 Bad Request Response: {“error”:“invalid_grant”,“error_description”:“Stale token”} 2022/08/10 09:02:33 DEBUG : jottacloud root ‘’: Token expired but no uploads in progress - doing nothing 2022/08/10 09:02:33 Failed to create file system for “jotta_archive:”: couldn’t get customer info: Get “https://api.jottacloud.com/account/v1/customer”: couldn’t fetch token - maybe it has expired? - refresh with “rclone config reconnect jotta_archive:”: oauth2: cannot fetch token: 400 Bad Request Response: {“error”:“invalid_grant”,“error_description”:“Stale token”}
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don’t comment if you have no relevant information to add. It’s just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 16 (7 by maintainers)
Thanks for clarification. But from the documentation it was not clear, that one can generate multiple tokens that are valid side by side.
So I can confirm that it is now working properly, but was not easy to understand in the first place.
Will close this issue.
Again Thanks for supporting on this issue!