Error reconnect Onedrive

What is the problem you are having with rclone?

I had a remote connect with Onedrive that worked fine before token as expired.
If I try to reconnect with che command 'rclone config reconnect' I receive this error:
2024/09/13 07:20:14 DEBUG : OneDrive_official: config out: out=&{State:choose_type Option: OAuth: Error:Failed to query available drives: Get "https://graph.microsoft.com/v1.0/me/drives": dial tcp: lookup graph.microsoft.com on [::1]:53: read udp [::1]:57417->[::1]:53: read: connection refused Result:}, err=
Failed to query available drives: Get "https://graph.microsoft.com/v1.0/me/drives": dial tcp: lookup graph.microsoft.com on [::1]:53: read udp [::1]:57417->[::1]:53: read: connection refused

Following the link graph.microsoft I get this response:
{
"error": {
"code": "InvalidAuthenticationToken",
"message": "Access token is empty.",
"innerError": {
"date": "2024-09-13T05:20:42",
"request-id": "xxxx",
"client-request-id": "xxxx"
}
}
}

I've a second Onedrive account connected that I tried to delete and recreate but I got same result.

Some one can help me ?

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

rclone v1.67.0

  • os/version: debian 12.7 (64 bit)
  • os/kernel: 6.1.0-25-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.22.4
  • go/linking: static
  • go/tags: none

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

Onedrive

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

rclone config reconnect  OneDrive_official: -vv

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[OneDrive_official]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[bkp_onedrive]
type = onedrive
token = XXX

A log from the command that you were trying to run with the -vv flag

root@server:/usr/local/bin# rclone config reconnect  OneDrive_official: -vv
2024/09/13 07:18:52 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "config" "reconnect" "OneDrive_official:" "-vv"]
2024/09/13 07:18:52 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/09/13 07:18:52 DEBUG : OneDrive_official: config in: state="", result=""
2024/09/13 07:18:52 DEBUG : OneDrive_official: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:18:52 DEBUG : OneDrive_official: config in: state="*oauth,choose_type,,", result=""
2024/09/13 07:18:52 DEBUG : OneDrive_official: config out: out=&{State:*oauth-confirm,choose_type,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:18:52 DEBUG : OneDrive_official: config: reading config parameter "config_refresh_token"
Already have a token - refresh?
y) Yes (default)
n) No
y/n> y

2024/09/13 07:18:53 DEBUG : OneDrive_official: config in: state="*oauth-confirm,choose_type,,", result="true"
2024/09/13 07:18:53 DEBUG : OneDrive_official: config out: out=&{State:*oauth-islocal,choose_type,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:18:53 DEBUG : OneDrive_official: config: reading config parameter "config_is_local"
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> n

2024/09/13 07:18:55 DEBUG : OneDrive_official: config in: state="*oauth-islocal,choose_type,,", result="false"
2024/09/13 07:18:55 DEBUG : OneDrive_official: config out: out=&{State:*oauth-remote,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:18:55 DEBUG : OneDrive_official: config in: state="*oauth-remote,choose_type,,", result=""
2024/09/13 07:18:55 DEBUG : sending drive_id = "e2126667f93593e7"
2024/09/13 07:18:55 DEBUG : sending drive_type = "personal"
2024/09/13 07:18:55 DEBUG : OneDrive_official: config out: out=&{State:*oauth-authorize,choose_type,, Option: OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:18:55 DEBUG : OneDrive_official: config: reading config parameter "config_token"
Option 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" "eyJkcml2ZV9pZCI6I******V90eXBlIjoicGVyc29uYWwifQ"
Then paste the result.
Enter a value.
config_token> eyJ0b***

2024/09/13 07:20:10 DEBUG : OneDrive_official: config in: state="*oauth-authorize,choose_type,,", result="eyJ0b***"
2024/09/13 07:20:10 DEBUG : Saving config "token" in section "OneDrive_official" of the config file
2024/09/13 07:20:10 DEBUG : received token = "{\"access_token\":\"EwCIA***==\",\"token_type\":\"Bearer\",\"refresh_token\":\"M.C532_SN1.0.U.-CieMMSaFgv0G***mlMU$\",\"expiry\":\"2024-09-13T08:19:51.8181229+02:00\"}"
2024/09/13 07:20:10 DEBUG : OneDrive_official: config out: out=&{State:*oauth-done,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:20:10 DEBUG : OneDrive_official: config in: state="*oauth-done,choose_type,,", result=""
2024/09/13 07:20:10 DEBUG : OneDrive_official: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:20:10 DEBUG : OneDrive_official: config in: state="choose_type", result=""
2024/09/13 07:20:10 DEBUG : OneDrive_official: config out: out=&{State:choose_type_done Option:onedrive OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:20:10 DEBUG : OneDrive_official: config: reading config parameter "config_type"
Option config_type.
Type of connection
Choose a number from below, or type in an existing value of type string.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 1

2024/09/13 07:20:14 DEBUG : OneDrive_official: config in: state="choose_type_done", result="onedrive"
2024/09/13 07:20:14 DEBUG : OneDrive_official: config out: out=&{State:onedrive Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2024/09/13 07:20:14 DEBUG : OneDrive_official: config in: state="onedrive", result=""
2024/09/13 07:20:14 DEBUG : OneDrive_official: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error:Failed to query available drives: Get "https://graph.microsoft.com/v1.0/me/drives": dial tcp: lookup graph.microsoft.com on [::1]:53: read udp [::1]:57417->[::1]:53: read: connection refused Result:}, err=<nil>
Failed to query available drives: Get "https://graph.microsoft.com/v1.0/me/drives": dial tcp: lookup graph.microsoft.com on [::1]:53: read udp [::1]:57417->[::1]:53: read: connection refused


The problem is solved: I just reboot my system (Debian 12), repeat the procedure and it works ....

I don't know why

Thanks

1 Like

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