I am unable to use the purge command. The error indicates that my token contains an invalid signature. I edited the config to refresh the token and got the same error.
What is your rclone version (output from rclone version)
rclone v1.53.0
also tried on rclone v1.54.0-beta.4768.6a56ac103 with the same error
Which OS you are using and how many bits (eg Windows 7, 64 bit)
MacOS 10.14.6
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 purge onedrive:temp
The rclone config contents with secrets removed.
[onedrive]
type = onedrive
token = {"access_token":"redacted","expiry":"2020-09-11T17:18:16.634655-04:00"}
drive_id = redacted
drive_type = business
A log from the command with the -vv flag
2020/09/11 16:20:57 DEBUG : rclone: Version "v1.53.0" starting with parameters ["rclone" "purge" "-vv" "onedrive:temp"]
2020/09/11 16:20:57 DEBUG : Creating backend with remote "onedrive:temp"
2020/09/11 16:20:57 DEBUG : Using config file from "/Users/BeansIsFat/.config/rclone/rclone.conf"
2020/09/11 16:21:00 ERROR : Attempt 1/3 failed with 1 errors and: unauthenticated: invalidSignature: Token contains invalid signature.
2020/09/11 16:21:00 ERROR : Attempt 2/3 failed with 1 errors and: unauthenticated: invalidSignature: Token contains invalid signature.
2020/09/11 16:21:00 ERROR : Attempt 3/3 failed with 1 errors and: unauthenticated: invalidSignature: Token contains invalid signature.
2020/09/11 16:21:00 DEBUG : 8 go routines active
2020/09/11 16:21:00 Failed to purge: unauthenticated: invalidSignature: Token contains invalid signature.
i've been able to remove the directory by mounting onedrive on linux (not tested on windows) and doing an "rm -rf" of target direcory. In this way, i've been able to get rid of it.
(i've also tested with onedrive web frontend, but is impossible to delete non empty dir on web, and i've a lot of files in subdir, so was not an option to do it manually on web )
However it has turned the DELETE into a GET request...
After a lot of thinking, I think this is actually a bug in the go runtime and I've reported that here.
Ideally Microsoft should be issuing a 307 redirect here which means don't change the HTTP verb. I think Go's behaviour in changing the DELETE is wrong though.
You can do this with rclone by using the --disable Purge flag which stops the special purge method for onedrive running and rclone will revert back to iterating the directory and deleting things individually.
It is possible to make a workaround for this if you are desperate - let me know!