Originally icloud to crypt wrapping S3 but I was able to see it with icloud to local for easier debugging. The error messages are different with S3 but I suspect they are actually related to the errors I am seeing here with local.
Run the command 'rclone version' and share the full output of the command.
[icloud]
type = iclouddrive
apple_id = XXX
password = XXX
cookies = XXX
trust_token = XXX
A log from the command with the -vv flag
2025/01/14 12:59:05 DEBUG : Setting --password-command "rclone-pass-store echo" from environment variable RCLONE_PASSWORD_COMMAND="rclone-pass-store echo"
2025/01/14 12:59:05 DEBUG : rclone: Version "v1.69.0" starting with parameters ["rclone" "copy" "-vv" "icloud:Numbers/Blank.numbers-tef" "."]
2025/01/14 12:59:05 DEBUG : Creating backend with remote "icloud:Numbers/Blank.numbers-tef"
2025/01/14 12:59:05 DEBUG : Using config file from "/home/jwinokur/.config/rclone/rclone.conf"
2025/01/14 12:59:05 DEBUG : icloud: Valid session, no need to reauth
2025/01/14 12:59:06 DEBUG : fs cache: renaming child cache item "icloud:Numbers/Blank.numbers-tef" to be canonical for parent "icloud:Numbers"
2025/01/14 12:59:06 DEBUG : Creating backend with remote "."
2025/01/14 12:59:06 DEBUG : fs cache: renaming cache item "." to be canonical "/home/jwinokur/hold"
2025/01/14 12:59:06 DEBUG : Blank.numbers-tef: Need to transfer - File not found at Destination
2025/01/14 12:59:09 ERROR : Blank.numbers-tef.e69878d9.partial: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
2025/01/14 12:59:09 INFO : Blank.numbers-tef.e69878d9.partial: Removing failed copy
2025/01/14 12:59:09 ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
2025/01/14 12:59:09 DEBUG : Blank.numbers-tef: Need to transfer - File not found at Destination
2025/01/14 12:59:11 ERROR : Blank.numbers-tef.e69878d9.partial: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
2025/01/14 12:59:11 INFO : Blank.numbers-tef.e69878d9.partial: Removing failed copy
2025/01/14 12:59:11 ERROR : Attempt 2/3 failed with 1 errors and: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
2025/01/14 12:59:11 DEBUG : Blank.numbers-tef: Need to transfer - File not found at Destination
2025/01/14 12:59:13 ERROR : Blank.numbers-tef.e69878d9.partial: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
2025/01/14 12:59:13 INFO : Blank.numbers-tef.e69878d9.partial: Removing failed copy
2025/01/14 12:59:13 ERROR : Attempt 3/3 failed with 1 errors and: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
2025/01/14 12:59:13 INFO :
Transferred: 186.776 KiB / 186.776 KiB, 100%, 20.752 KiB/s, ETA 0s
Errors: 1 (retrying may help)
Elapsed time: 6.9s
2025/01/14 12:59:13 DEBUG : 11 go routines active
2025/01/14 12:59:13 NOTICE: Failed to copy: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /home/jwinokur/hold) 63753
$ rclone copy -vv icloud:"Numbers/Blank.numbers-tef" .
2025/01/14 14:55:51 DEBUG : Setting --password-command "rclone-pass-store echo" from environment variable RCLONE_PASSWORD_COMMAND="rclone-pass-store echo"
2025/01/14 14:55:51 DEBUG : rclone: Version "v1.69.0" starting with parameters ["rclone" "copy" "-vv" "icloud:Numbers/Blank.numbers-tef" "."]
2025/01/14 14:55:51 DEBUG : Creating backend with remote "icloud:Numbers/Blank.numbers-tef"
2025/01/14 14:55:51 DEBUG : Using config file from "/Users/jgwinok/.config/rclone/rclone.conf"
2025/01/14 14:55:51 DEBUG : icloud: Valid session, no need to reauth
2025/01/14 14:55:54 DEBUG : fs cache: renaming child cache item "icloud:Numbers/Blank.numbers-tef" to be canonical for parent "icloud:Numbers"
2025/01/14 14:55:54 DEBUG : Creating backend with remote "."
2025/01/14 14:55:54 DEBUG : fs cache: renaming cache item "." to be canonical "/Users/jgwinok/hold"
2025/01/14 14:55:54 DEBUG : Blank.numbers-tef: Need to transfer - File not found at Destination
2025/01/14 14:55:58 ERROR : Blank.numbers-tef.e69878d9.partial: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
2025/01/14 14:55:58 INFO : Blank.numbers-tef.e69878d9.partial: Removing failed copy
2025/01/14 14:55:58 ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
2025/01/14 14:55:59 DEBUG : Blank.numbers-tef: Need to transfer - File not found at Destination
2025/01/14 14:56:02 ERROR : Blank.numbers-tef.e69878d9.partial: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
2025/01/14 14:56:02 INFO : Blank.numbers-tef.e69878d9.partial: Removing failed copy
2025/01/14 14:56:02 ERROR : Attempt 2/3 failed with 1 errors and: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
2025/01/14 14:56:02 DEBUG : Blank.numbers-tef: Need to transfer - File not found at Destination
2025/01/14 14:56:06 ERROR : Blank.numbers-tef.e69878d9.partial: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
2025/01/14 14:56:06 INFO : Blank.numbers-tef.e69878d9.partial: Removing failed copy
2025/01/14 14:56:06 ERROR : Attempt 3/3 failed with 1 errors and: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
2025/01/14 14:56:06 INFO :
Transferred: 186.776 KiB / 186.776 KiB, 100%, 11.320 KiB/s, ETA 0s
Errors: 1 (retrying may help)
Elapsed time: 11.2s
2025/01/14 14:56:06 DEBUG : 12 go routines active
2025/01/14 14:56:06 NOTICE: Failed to copy: corrupted on transfer: sizes differ src(Numbers) 370168 vs dst(Local file system at /Users/jgwinok/hold) 63753
So that’s the same size as seen in the log on the source. iPhone interface says 389KB which also seems wrong…
I don’t think these files are special. I thought maybe the numbers one was because it’s Apple’s format but the others aren’t.
But I honestly don’t even know what’s in them. I hardly used iCloud Drive because it lacked rclone support. Now that it does, I set it up with my normal backup system which failed. I tested manually for this post.
I am hesitant to post the log publicly as it contains quite a lot of auth headers. Is there a better way to share it?
This is far from definitive, but I see six places in the log that look like binary but start with PK. Apple Numbers uses a zip-based format (like so many tools) so I extracted that chunk in a quick Python script to pull them. They are all 63330 byes (but I would take that with a grain of salt. I could be added with my rough script to pull it and/or missing the end). But even with that grain of salt, they are on the order of 63753. (Encoding as gzip wouldn't start with PK, right? It would be \x1F\x8B\x08)
This did work to download and it is 63753 bytes but I have no way to know if it is a valid file.
I did find .numbers-tef - Apple Community which indicates that -tef means its on icloud so maybe Apple is doing something funny (kind of like OneDrive does with Office files) but pxm is not an apple format (well, they did just acquire Pixelmator).
A possible lead is that the metadata format, when downloaded with --ignore-size, is also a zip-based format (magic numbers PK).
A strong lead:
When I unzip the Blank.numbers-tef it all I get a size of 370168 Bytes!
My guess: The API is reporting to rclone the size of the accumulated files stored in a zip file but, as expected, when you download the file, which is just a zip under the hood, you get the correct zipped up file.
The question is, is this a bug in the API? How rclone interacts with the API? Both?
I will test it later by created a Numbers file and uploading it but i tmay have to wait until I am back home as I don't have iCloud Drive on my work mac.
I tried to replicate it by making a .zip of 10 highly compressible files (1 MiB of the same byte, \x00, \x01, etc) then round-tripping it to icloud and back. That worked as expected--including lsjson --stat reporting the correct size on iCloud. So I repeated it but named the file .numbers and that too worked. I can share the scripts where I did this but it's not that interesting since it worked.
I will need to test with an actual Numbers file as opposed to a fake one but alas, at work, I have more limited access.
I have been trying to get this to happen again on a new file and I simply can't. It is 100% consistent with the given example file but whenever I try to replicate it, it works as expected.
As I said, iCloud Drive was never my main cloud storage because it didn't support rclone, so that file is likely very, very old.
My guess (hope?) is that it is a bug related to the older file on Apple's end and it is working for new files.
I think the path forward is to not worry about this further unless it comes up again. Then this will serve as another reference. Probably not worth further investment otherwise.