Dropbox expiring, token not being refreshed

What is the problem you are having with rclone?

Hi All, I will really appreciate it, if someone can help me find a solution to my problem. I have a new plex server set up and I am mounting my dropbox content with rclone. It works for 4 hours and the token expires and it never refreshes. I have followed steps and I was able to mount it without a problem. I hope that someone can point me to the right direction. One thing that I forgot to mention is that the Dropbox account is being used on my old server with a none expiring token that has been created 2 years ago.

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1

  • 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.17.9

  • go/linking: static

  • go/tags: none

YES

Which cloud storage system are you using? (eg Google Drive)

DROPBOX

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone lsd pfETdb:

The rclone config contents with secrets removed.

[pfETdb]
type = dropbox
client_id = 
client_secret = 
token = {"access_token":"XXX","token_type"
:"bearer","refresh_token":"XXX","expiry":"2022-06-06T14:46:57.54423-04:00"}


A log from the command with the -vv flag

2022/06/06 17:40:10 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "lsd" "pfETdb:" "-vv"]
2022/06/06 17:40:10 DEBUG : Creating backend with remote "pfETdb:"
2022/06/06 17:40:10 DEBUG : Using config file from "/home/enriquetorrez/.config/rclone/rclone.conf"
2022/06/06 17:40:11 ERROR : : error listing: expired_access_token/
2022/06/06 17:40:11 DEBUG : 6 go routines active
2022/06/06 17:40:11 Failed to lsd with 2 errors: last error was: expired_access_token/
2022/06/06 17:40:11 INFO  : Dropbox root '': Commiting uploads - please wait...

You'd have to share the log prior to it expiring to see what's going on as it should refresh.

Can you reconnect it and share a full debug log on the mount once it breaks?

These tokens have been phased out by dropbox, or are being phased out. Use rclone config reconnect pfETdb: to get a new token and rclone will refresh it as necessary.

Thank you, my old server which is currently working has that dropbox mount and it is working fine. I don't want to refresh it. My new server is the one that the rclone mount expires. Should I proceed anyway?

Thank you, can you share a command line that I can use so I can successfully create the log that you want me to share? Thanks again.

You should run the reconnect on whichever server you have the problem on.

Yes I did reconnect the dropbox mount and I am able to list the folders with the following command:

rclone lsd pfETdb: -vvv

and the is the result:

2022/06/06 20:59:21 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "lsd" "pfETdb:" "-vvv"]
2022/06/06 20:59:21 DEBUG : Creating backend with remote "pfETdb:"
2022/06/06 20:59:21 DEBUG : Using config file from "/home/enriquetorrez/.config/rclone/rclone.conf"
          -1 2022-06-06 20:59:22        -1 Quique
2022/06/06 20:59:22 DEBUG : 6 go routines active
2022/06/06 20:59:22 INFO  : Dropbox root '': Commiting uploads - please wait...

And now that it expired and I wanted to list folders using the dropbox mount, I have the following:

enriquetorrez@nephele:~$ rclone lsd pfETdb: -vvv
2022/06/06 22:24:22 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "lsd" "pfETdb:" "-vvv"]
2022/06/06 22:24:22 DEBUG : Creating backend with remote "pfETdb:"
2022/06/06 22:24:22 DEBUG : Using config file from "/home/enriquetorrez/.config/rclone/rclone.conf"
2022/06/06 22:24:22 DEBUG : pfETdb: Loaded invalid token from config file - ignoring
2022/06/06 22:24:23 DEBUG : pfETdb: Token refresh failed try 1/5: oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:24 DEBUG : pfETdb: Loaded invalid token from config file - ignoring
2022/06/06 22:24:25 DEBUG : pfETdb: Token refresh failed try 2/5: oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:26 DEBUG : pfETdb: Loaded invalid token from config file - ignoring
2022/06/06 22:24:27 DEBUG : pfETdb: Token refresh failed try 3/5: oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:28 DEBUG : pfETdb: Loaded invalid token from config file - ignoring
2022/06/06 22:24:29 DEBUG : pfETdb: Token refresh failed try 4/5: oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:30 DEBUG : pfETdb: Loaded invalid token from config file - ignoring
2022/06/06 22:24:31 DEBUG : pfETdb: Token refresh failed try 5/5: oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:32 ERROR : : error listing: Post "https://api.dropboxapi.com/2/files/list_folder": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect pfETdb:": oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:32 DEBUG : 6 go routines active
2022/06/06 22:24:32 Failed to lsd with 2 errors: last error was: Post "https://api.dropboxapi.com/2/files/list_folder": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect pfETdb:": oauth2: cannot fetch token: 400 Bad Request
Response: {"error": "invalid_client: Invalid client_id or client_secret"}
2022/06/06 22:24:32 INFO  : Dropbox root '': Commiting uploads - please wait...

That looks like the client ID and secret are invalid.

I use dropbox myself and haven't seen any items with refreshing.

That is weird because the Client ID and the secret are correct, I wouldn't be able to list the folders, if the client id and secret are not valid, right?

Did someone change the rclone.conf? Is the app removed from the console?

That error is saying the client id/secret are wrong so not sure offhand.

What did you do on the new server? Did you make a new app? What steps did you follow?

It was clean/fresh installation. I follow the simple steps from rclone config, I selected dropbox and I entered my username and password that I use to access files. Should I go to the dropbox console and use the appkey and the appsecret instead for the app I created?

Did you leave the client ID and secret blank or did you enter anything?

I did enter my dropbox credentials, username and password.

When you ran rclone config, there is a section to enter in the client ID and secret:

Storage> dropbox
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>
Edit advanced config?
y) Yes
n) No (default)
y/n>

Did you leave that part blank? There isn't any spot to enter in a user name and password.

I used client_id as my username and client_secret as my password. Should I leave it blank?

You can. I'd make an app though:

Dropbox (rclone.org)

1 Like

Thank you so much. I already set up my rclone dropbox mount using the link that you shared. Let's see how it behaves this time. Thanks again!

This actually works. Thank you very much!!

2 Likes

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