rclone: Onedrive config_token generated on Windows does Not work on Linux

What is the problem you are having with rclone?

Linux rclone does not accept token generate by windows

What is your rclone version (output from rclone version)

1.56.1

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

Ubuntu 20 64bit Windows 10 64bit

Which cloud storage system are you using? (e.g. Google Drive)

Onedrive

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

root@fr4:~# rclone -vv  config reconnect onedrive_test:

A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)

2021/09/26 09:16:29 DEBUG : rclone: Version "v1.56.1" starting with parameters ["rclone" "-vv" "config" "reconnect" "onedrive_test:"]
2021/09/26 09:16:29 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/09/26 09:16:29 DEBUG : onedrive_test: config in: state="", result=""
2021/09/26 09:16:29 DEBUG : onedrive_test: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:16:29 DEBUG : onedrive_test: config in: state="*oauth,choose_type,,", result=""
2021/09/26 09:16:29 DEBUG : onedrive_test: config out: out=&{State:*oauth-confirm,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:16:29 DEBUG : onedrive_test: config in: state="*oauth-confirm,choose_type,,", result=""
2021/09/26 09:16:29 DEBUG : onedrive_test: config out: out=&{State:*oauth-islocal,choose_type,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:16:29 DEBUG : onedrive_test: config: reading config parameter "config_is_local"
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> n
2021/09/26 09:16:30 DEBUG : onedrive_test: config in: state="*oauth-islocal,choose_type,,", result="false"
2021/09/26 09:16:30 DEBUG : onedrive_test: config out: out=&{State:*oauth-remote,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:16:30 DEBUG : onedrive_test: config in: state="*oauth-remote,choose_type,,", result=""
2021/09/26 09:16:30 DEBUG : sending client_id = "fe38556a-58d0-4181-88af-6a7b5acf1333"
2021/09/26 09:16:30 DEBUG : sending client_secret = "xSv7Q~kgVBoFpc2zoe.LERmQCGlFuvI6U07HV"
2021/09/26 09:16:30 DEBUG : onedrive_test: config out: out=&{State:*oauth-authorize,choose_type,, Option: OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:16:30 DEBUG : onedrive_test: config: reading config parameter "config_token"
For this to work, you will need rclone available on a machine that has
a web browser available.

For more help and alternate methods see: https://rclone.org/remote_setup/

Execute the following on the machine with the web browser (same rclone
version recommended):

        rclone authorize "onedrive" "eyJjbGll..."

Then paste the result.

Enter a string value. Press Enter for the default ("").
config_token>
This value is required and it has no default.
Enter a string value. Press Enter for the default ("").
config_token> eyJ0eXAiOi....
2021/09/26 09:19:05 DEBUG : onedrive_test: config in: state="*oauth-authorize,choose_type,,", result="eyJ0eXAiOi....\",\"token_type\":\"Bearer\",\"refresh_token\":\"0.AS..."
2021/09/26 09:19:05 DEBUG : onedrive_test: config out: out=&{State:*oauth-authorize,choose_type,, Option:<nil> OAuth:<nil> Error:Couldn't decode response - try again (make sure you are using a matching version of rclone on both sides: invalid character 'e' looking for beginning of value
 Result:}, err=<nil>
Couldn't decode response - try again (make sure you are using a matching version of rclone on both sides: invalid character 'e' looking for beginning of value

2021/09/26 09:19:05 DEBUG : onedrive_test: config in: state="*oauth-authorize,choose_type,,", result=""
2021/09/26 09:19:05 DEBUG : onedrive_test: config out: out=&{State:*oauth-done,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:19:05 DEBUG : onedrive_test: config in: state="*oauth-done,choose_type,,", result=""
2021/09/26 09:19:05 DEBUG : onedrive_test: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/09/26 09:19:05 DEBUG : onedrive_test: config in: state="choose_type", result=""
2021/09/26 09:19:05 DEBUG : onedrive_test: config out: out=<nil>, err=failed to configure OneDrive: empty token found - please run "rclone config reconnect onedrive_test:"
Error: failed to configure OneDrive: empty token found - please run "rclone config reconnect onedrive_test:"
Usage:
  rclone config reconnect remote: [flags]

Flags:
  -h, --help   help for reconnect

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2021/09/26 09:19:05 Fatal error: failed to configure OneDrive: empty token found - please run "rclone config reconnect onedrive_test:"

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: open
  • Created 3 years ago
  • Comments: 23 (15 by maintainers)

Most upvoted comments

@Cnly You suspect then you verify. In 1.56 on windiws it generate token start with โ€˜eโ€™ but not like v.1.54 starts with โ€˜{โ€™. If this a specific case then you can just close issue.

I had checked many times before I write this issue. And obviously the head of the token is different. Please check it by yourself.