I can’t use rclone cleanup on my Box remote. I didn’t change anything in my config but I haven’t used rclone for a while so I don’t know if I need to do it differently now. And yes, I’ve reauthenticated already because my token was expired.
Run the command 'rclone version' and share the full output of the command.
rclone v1.70.3
- os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
- os/kernel: 10.0.19045.4170 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.24.4
- go/linking: static
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Box
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone cleanup Box: -vv
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
rclone config redacted
[Box]
type = box
token = XXX
A log from the command that you were trying to run with the -vv flag
rclone cleanup Box: -vv
2025/08/25 15:13:07 DEBUG : rclone: Version "v1.70.3" starting with parameters ["C:\\rclone\\rclone.exe" "cleanup" "Box:" "-vv"]
2025/08/25 15:13:07 DEBUG : Creating backend with remote "Box:"
2025/08/25 15:13:07 DEBUG : Using config file from "C:\\rclone\\rclone.conf"
2025/08/25 15:13:08 ERROR : Attempt 1/3 failed with 1 errors and: couldn't list files: json: cannot unmarshal object into Go struct field FolderItems.order of type []struct { By string "json:\"by\""; Direction string "json:\"direction\"" }
2025/08/25 15:13:09 ERROR : Attempt 2/3 failed with 1 errors and: couldn't list files: json: cannot unmarshal object into Go struct field FolderItems.order of type []struct { By string "json:\"by\""; Direction string "json:\"direction\"" }
2025/08/25 15:13:10 ERROR : Attempt 3/3 failed with 1 errors and: couldn't list files: json: cannot unmarshal object into Go struct field FolderItems.order of type []struct { By string "json:\"by\""; Direction string "json:\"direction\"" }
2025/08/25 15:13:10 DEBUG : 4 go routines active
2025/08/25 15:13:10 NOTICE: Failed to cleanup: couldn't list files: json: cannot unmarshal object into Go struct field FolderItems.order of type []struct { By string "json:\"by\""; Direction string "json:\"direction\"" }
Can someone please make the bug report in my stead? For some reason Github keeps banning me whenever I make a new account. I think it hates my ISP.
Here is the dump result:
rclone cleanup Box: -vv --retries 1 --dump bodies
2025/08/25 17:58:51 NOTICE: Automatically setting -vv as --dump is enabled
2025/08/25 17:58:51 DEBUG : rclone: Version "v1.70.3" starting with parameters ["C:\\rclone\\rclone.exe" "cleanup" "Box:" "-vv" "--retries" "1" "--dump" "bodies"]
2025/08/25 17:58:51 DEBUG : Creating backend with remote "Box:"
2025/08/25 17:58:51 DEBUG : Using config file from "C:\\rclone\\rclone.conf"
2025/08/25 17:58:51 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2025/08/25 17:58:51 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2025/08/25 17:58:51 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2025/08/25 17:58:51 DEBUG : HTTP REQUEST (req 0xc00044edc0)
2025/08/25 17:58:51 DEBUG : GET /2.0/folders/trash/items?fields=type%2Cid%2Csequence_id%2Cetag%2Csha1%2Cname%2Csize%2Ccreated_at%2Cmodified_at%2Ccontent_created_at%2Ccontent_modified_at%2Citem_status%2Cshared_link%2Cowned_by&limit=1000&usemarker=true HTTP/1.1
Host: api.box.com
User-Agent: rclone/v1.70.3
Authorization: XXXX
Accept-Encoding: gzip
2025/08/25 17:58:51 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2025/08/25 17:58:51 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2025/08/25 17:58:51 DEBUG : HTTP RESPONSE (req 0xc00044edc0)
2025/08/25 17:58:51 DEBUG : HTTP/2.0 200 OK
Connection: close
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Box-Request-Id: 03a87bb60f5242cb9ef1f8b0921b2140c
Cache-Control: no-cache, no-store
Content-Type: application/json
Date: Mon, 25 Aug 2025 21:58:53 GMT
Strict-Transport-Security: max-age=31536000
Via: 1.1 google
X-Envoy-Upstream-Service-Time: 206
{"entries":[{"type":"file","id":"REDACTED","etag":"1","sequence_id":"1","sha1":"f77df368b06a1031234d445a48f7cc38d423fd18","name":"brave-portable-win64-1.80.115-96-setup.exe","size":162941791,"created_at":"2025-08-25T14:37:29-07:00","modified_at":"2025-08-25T14:37:29-07:00","content_created_at":"2025-08-24T16:39:02-07:00","content_modified_at":"2025-08-24T16:39:02-07:00","item_status":"trashed","shared_link":null,"owned_by":{"type":"user","id":"REDACTED","name":"REDACTED","login":"REDACTED"}}],"limit":1000,"order":{"by":"deleted","direction":"desc"}}
2025/08/25 17:58:51 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2025/08/25 17:58:51 ERROR : Attempt 1/1 failed with 1 errors and: couldn't list files: json: cannot unmarshal object into Go struct field FolderItems.order of type []struct { By string "json:\"by\""; Direction string "json:\"direction\"" }
2025/08/25 17:58:51 DEBUG : 4 go routines active
2025/08/25 17:58:51 NOTICE: Failed to cleanup: couldn't list files: json: cannot unmarshal object into Go struct field FolderItems.order of type []struct { By string "json:\"by\""; Direction string "json:\"direction\"" }
That one works, thank you! Is it safe to use this as my main rclone version? I work with other remotes too, not just Box
EDIT:
Actually I can just edit my scripts to call this executable whenever I need to do a Box cleanup. No need to completely switch to it if the other commands work fine on the stable release.
I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.72 and v1.71.1 if we end up making a point release.
The beta you've got is very nearly the v1.71 release so should be stable in use.