OneDrive sync problem - InvalidAuthenticationToken: Unable to initialize RPS

Hi all!
Since a couple of days I'm getting errors on my personal OneDrive account when trying to sync it.
I've found a similar problem posted yesterday (12th of March 2021) by the user ironblack. The topic is called "Rclne errors with OneDrive sync", I can't link you to it because of post restrictions.
I'm probably having the same errors as him. He said in his post, that the errors began to araise after 9th of March (09.03.2021), while I'm receiving errors since the 11th of March (11.03.2021).
Maybe something changed onbehalf of Microsoft OneDrive, because this setup was running for over a year now without any issues.
I'm going more into details on the error and setup below.

What I've tried so far:

  • I have upgraded TrueNAS 12 to the latest release (12.0-U2.1)
  • I have tried to refresh the OneDrive (TrueNAS said it was successful, but rclone still cant sync)
  • I have tried to create a new Login / Token and a new sync task to another location just for testing but I'm receiving the same errors.
  • I have checked the time settings (all seems ok)
  • I have checked the disks (all seems ok)
  • I have searched different topics on the rclone forum and the thread of ironblack seems to be about the same issue.

What is the problem you are having with rclone?

Since the 11th of March (11.03.2021), rclone can't sync my personal OneDrive account. Other accounts like Google Drive work without any issues. The OneDrive account was working for over a year now.

What is your rclone version (output from rclone version)

rclone v1.53.1-DEV

  • os/arch: freebsd/amd6
  • go version: go1.15.2

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

TrueNAS-12.0-U2.1

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

OneDrive personal (having issues)
Google Drive (not having issues)

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

Unfortunately I can't say what command TrueNAS is using in the background.
The settings used in TrueNAS are:
Direction: PULL
Transfer Mode: SYNC
Credentials: OneDrivePersonal (ONEDRIVE)
And of course the remote and destination. I haven't configured any further settings lile encryption or following symlinks or such.

The rclone config contents with secrets removed.

[RemoteOneDrivePersonal]
type = onedrive
token = {"access_token":"****","expiry":"2019-05-18T23:48:18.7635624+02:00"}
drive_id = ****
drive_type = personal

[RemoteGoogleDrive1]
type = drive
scope = drive.readonly
token = {"access_token":"****","token_type":"Bearer","refresh_token":"****","expiry":"2019-05-19T00:41:22.338167403+02:00"}

[RemoteGoogleDrive2]
type = drive
scope = drive.readonly
token = {"access_token":"****","token_type":"Bearer","refresh_token":"****","expiry":"2019-05-19T00:53:34.791239575+02:00"}

A log from the command with the -vv flag

I posted the log I get from TrueNAS below. I would be happy, if you could guide me on how I can get you a more detailed output, because I don't know what TrueNAS is using as a command in the background.

2021/03/12 21:48:01 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time:         1.5s

2021/03/12 21:48:02 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                 2 / 2, 100%
Elapsed time:         2.5s

2021/03/12 21:48:03 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                30 / 30, 100%
Elapsed time:         3.5s

2021/03/12 21:48:04 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                85 / 85, 100%
Elapsed time:         4.5s

2021/03/12 21:48:05 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               175 / 175, 100%
Elapsed time:         5.5s

2021/03/12 21:48:06 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               236 / 236, 100%
Elapsed time:         6.5s

2021/03/12 21:48:07 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               307 / 307, 100%
Elapsed time:         7.5s

2021/03/12 21:48:08 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               364 / 364, 100%
Elapsed time:         8.5s

2021/03/12 21:48:09 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               418 / 418, 100%
Elapsed time:         9.5s

2021/03/12 21:48:10 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               478 / 478, 100%
Elapsed time:        10.5s

2021/03/12 21:48:11 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               547 / 547, 100%
Elapsed time:        11.5s

2021/03/12 21:48:12 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:               636 / 636, 100%
Elapsed time:        12.5s

2021/03/12 21:48:12 ERROR : SOME_REMOTE_EXAMPLE_PATH: error reading source directory: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:48:13 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:               680 / 680, 100%
Elapsed time:        13.5s

2021/03/12 21:48:14 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:               712 / 712, 100%
Elapsed time:        14.5s

2021/03/12 21:48:15 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:               768 / 768, 100%
Elapsed time:        15.5s

2021/03/12 21:48:16 ERROR : SOME_REMOTE_EXAMPLE_PATH: error reading source directory: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:48:16 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:               842 / 842, 100%
Elapsed time:        16.5s

2021/03/12 21:48:17 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:               887 / 887, 100%
Elapsed time:        17.5s

2021/03/12 21:48:18 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:               928 / 928, 100%
Elapsed time:        18.5s

2021/03/12 21:48:19 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:               958 / 958, 100%
Elapsed time:        19.5s

2021/03/12 21:48:20 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              1000 / 1000, 100%
Elapsed time:        20.5s

2021/03/12 21:48:21 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              1036 / 1036, 100%
Elapsed time:        21.5s

2021/03/12 21:48:22 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              1050 / 1050, 100%
Elapsed time:        22.5s

2021/03/12 21:48:23 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              1058 / 1058, 100%
Elapsed time:        23.5s

2021/03/12 21:48:24 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              1081 / 1081, 100%
Elapsed time:        24.5s

2021/03/12 21:48:25 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              1098 / 1098, 100%
Elapsed time:        25.5s

2021/03/12 21:48:25 ERROR : Local file system at /mnt/SOME_LOCAL_EXAMPLE_PATH: not deleting files as there were IO errors
2021/03/12 21:48:25 ERROR : Local file system at /mnt/SOME_LOCAL_EXAMPLE_PATH: not deleting directories as there were IO errors
2021/03/12 21:48:25 INFO  : There was nothing to transfer
2021/03/12 21:48:25 ERROR : Attempt 1/3 failed with 3 errors and: march failed with 2 error(s): first error: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:48:26 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1100 / 1100, 100%
Elapsed time:        26.5s

2021/03/12 21:48:27 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1108 / 1108, 100%
Elapsed time:        27.5s

2021/03/12 21:48:28 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1141 / 1141, 100%
Elapsed time:        28.5s

2021/03/12 21:48:29 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1225 / 1225, 100%
Elapsed time:        29.5s

2021/03/12 21:48:30 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1326 / 1326, 100%
Elapsed time:        30.5s

2021/03/12 21:48:31 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1368 / 1368, 100%
Elapsed time:        31.5s

2021/03/12 21:48:32 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1454 / 1454, 100%
Elapsed time:        32.5s

2021/03/12 21:48:33 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1482 / 1482, 100%
Elapsed time:        33.5s

2021/03/12 21:48:34 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1540 / 1540, 100%
Elapsed time:        34.5s

2021/03/12 21:48:35 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1602 / 1602, 100%
Elapsed time:        35.5s

2021/03/12 21:48:36 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1697 / 1697, 100%
Elapsed time:        36.5s

2021/03/12 21:48:37 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1733 / 1733, 100%
Elapsed time:        37.5s

2021/03/12 21:48:38 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1763 / 1763, 100%
Elapsed time:        38.5s

2021/03/12 21:48:39 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              1802 / 1802, 100%
Elapsed time:        39.5s

2021/03/12 21:48:40 ERROR : SOME_REMOTE_EXAMPLE_PATH: error reading source directory: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:48:40 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              1882 / 1882, 100%
Elapsed time:        40.5s

2021/03/12 21:48:41 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              1934 / 1934, 100%
Elapsed time:        41.5s

2021/03/12 21:48:42 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              1984 / 1984, 100%
Elapsed time:        42.5s

2021/03/12 21:48:43 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2030 / 2030, 100%
Elapsed time:        43.5s

2021/03/12 21:48:44 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2059 / 2059, 100%
Elapsed time:        44.5s

2021/03/12 21:48:45 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2102 / 2102, 100%
Elapsed time:        45.5s

2021/03/12 21:48:46 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2136 / 2136, 100%
Elapsed time:        46.5s

2021/03/12 21:48:47 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2148 / 2148, 100%
Elapsed time:        47.5s

2021/03/12 21:48:48 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2149 / 2149, 100%
Elapsed time:        48.5s

2021/03/12 21:48:49 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2162 / 2162, 100%
Elapsed time:        49.5s

2021/03/12 21:48:50 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2179 / 2179, 100%
Elapsed time:        50.5s

2021/03/12 21:48:51 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2194 / 2194, 100%
Elapsed time:        51.5s

2021/03/12 21:48:51 ERROR : Local file system at /mnt/SOME_LOCAL_EXAMPLE_PATH: not deleting files as there were IO errors
2021/03/12 21:48:51 ERROR : Local file system at /mnt/SOME_LOCAL_EXAMPLE_PATH: not deleting directories as there were IO errors
2021/03/12 21:48:51 INFO  : There was nothing to transfer
2021/03/12 21:48:51 ERROR : Attempt 2/3 failed with 1 errors and: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:48:52 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:              2198 / 2198, 100%
Elapsed time:        52.5s

2021/03/12 21:48:53 ERROR : SOME_REMOTE_EXAMPLE_PATH: error reading source directory: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:48:53 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2220 / 2220, 100%
Elapsed time:        53.5s

2021/03/12 21:48:54 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2263 / 2263, 100%
Elapsed time:        54.5s

2021/03/12 21:48:55 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2291 / 2291, 100%
Elapsed time:        55.5s

2021/03/12 21:48:56 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2353 / 2353, 100%
Elapsed time:        56.5s

2021/03/12 21:48:57 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2416 / 2416, 100%
Elapsed time:        57.5s

2021/03/12 21:48:58 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2455 / 2455, 100%
Elapsed time:        58.5s

2021/03/12 21:48:59 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2499 / 2499, 100%
Elapsed time:        59.5s

2021/03/12 21:49:00 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2557 / 2557, 100%
Elapsed time:       1m0.5s

2021/03/12 21:49:01 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2616 / 2616, 100%
Elapsed time:       1m1.5s

2021/03/12 21:49:02 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2685 / 2685, 100%
Elapsed time:       1m2.5s

2021/03/12 21:49:03 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2711 / 2711, 100%
Elapsed time:       1m3.5s

2021/03/12 21:49:04 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2764 / 2764, 100%
Elapsed time:       1m4.5s

2021/03/12 21:49:05 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2814 / 2814, 100%
Elapsed time:       1m5.5s

2021/03/12 21:49:06 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:              2901 / 2901, 100%
Elapsed time:       1m6.5s

2021/03/12 21:49:06 ERROR : SOME_REMOTE_EXAMPLE_PATH: error reading source directory: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:49:07 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              2959 / 2959, 100%
Elapsed time:       1m7.5s

2021/03/12 21:49:08 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              2983 / 2983, 100%
Elapsed time:       1m8.5s

2021/03/12 21:49:09 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              3021 / 3021, 100%
Elapsed time:       1m9.5s

2021/03/12 21:49:10 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              3036 / 3036, 100%
Elapsed time:      1m10.5s

2021/03/12 21:49:11 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              3040 / 3040, 100%
Elapsed time:      1m11.5s

2021/03/12 21:49:12 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              3056 / 3056, 100%
Elapsed time:      1m12.5s

2021/03/12 21:49:13 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 2 (retrying may help)
Checks:              3074 / 3074, 100%
Elapsed time:      1m13.5s

2021/03/12 21:49:13 ERROR : SOME_REMOTE_EXAMPLE_PATH: error reading source directory: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:49:14 ERROR : Local file system at /mnt/SOME_LOCAL_EXAMPLE_PATH: not deleting files as there were IO errors
2021/03/12 21:49:14 ERROR : Local file system at /mnt/SOME_LOCAL_EXAMPLE_PATH: not deleting directories as there were IO errors
2021/03/12 21:49:14 INFO  : There was nothing to transfer
2021/03/12 21:49:14 ERROR : Attempt 3/3 failed with 4 errors and: march failed with 3 error(s): first error: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS
2021/03/12 21:49:14 INFO  : 
Transferred:   	         0 / 0 Bytes![Unbenannt|690x393](upload://c1NCov1FaD6uhglkqG7COlhifIB.jpeg) , -, 0 Bytes/s, ETA -
Errors:                 4 (retrying may help)
Checks:              3085 / 3085, 100%
Elapsed time:      1m14.3s

2021/03/12 21:49:14 Failed to sync with 4 errors: last error was: march failed with 3 error(s): first error: couldn't list files: InvalidAuthenticationToken: Unable to initialize RPS

hello and welcome to the forum,

not sure this is a bug, better to post using help and support template.

https://forum.rclone.org/t/rclone-errors-with-onedrive-sync/22792
that post has been updated, the problem went away on it own.

Hello and thanks for your reply.
It seems like it was an error on behalf of microsoft / onedrive. Without a change, it started working again yesterday (after 3 days of errors).

Thanks for your time anyways :slight_smile:

yes, you are the second rcloner with that problem, and in both cases, the problem went away on its own.

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