Error when trying to list contents of PrimarySync directory in iCloud Photos

What is the problem you are having with rclone?

When trying to list contents of "PrimarySync" directory in iCloud Photos (with either ls or lsd) I'm getting following erros:

rclone lsd iphotos:PrimarySync/
2026/07/12 16:42:03 ERROR : error listing: query user albums for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool
2026/07/12 16:42:03 NOTICE: Failed to lsd with 2 errors: last error was: query user albums for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool
rclone ls iphotos:PrimarySync/
2026/07/12 16:44:18 NOTICE: Failed to ls: query user albums for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool

Root of the remote is listed correctly:

rclone lsd iphotos:
          -1 2026-07-12 16:45:43         0 PrimarySync

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

rclone v1.75.0-beta.9911.c6cdb8993
- os/version: Microsoft Windows 10 Pro 22H2 22H2 (64 bit)
- os/kernel: 10.0.19045.5131 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.26.5
- go/linking: static
- go/tags: cmount

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

iCloud Photos

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

rclone lsd iphotos:PrimarySync/
rclone ls iphotos:PrimarySync/

The rclone config contents with secrets removed.

[iphotos]
type = iclouddrive
service = photos
apple_id = REMOVED
password = REMOVED
_auth_session = 
cookies = REMOVED
trust_token = REMOVED

A log from the command with the -vv flag

rclone -vv lsd iphotos:PrimarySync/
2026/07/12 16:50:28 DEBUG : Setting --config "rclone-standalone.conf" from environment variable RCLONE_CONFIG="rclone-standalone.conf"
2026/07/12 16:50:28 DEBUG : rclone: Version "v1.75.0-beta.9911.c6cdb8993" starting with parameters ["rclone" "-vv" "lsd" "iphotos:PrimarySync/"]
2026/07/12 16:50:28 DEBUG : Creating backend with remote "iphotos:PrimarySync/"
2026/07/12 16:50:28 DEBUG : Using config file from "C:\\Users\\Leo\\Downloads\\rclone-beta-latest-windows-amd64\\rclone-v1.75.0-beta.9911.c6cdb8993-windows-amd64\\rclone-standalone.conf"
2026/07/12 16:50:28 DEBUG : iclouddrive: reusing session with cached endpoints
2026/07/12 16:50:29 DEBUG : iclouddrive photos: refreshed 1 libraries from API
2026/07/12 16:50:29 DEBUG : fs cache: renaming cache item "iphotos:PrimarySync/" to be canonical "iphotos:PrimarySync"
2026/07/12 16:50:30 DEBUG : iclouddrive photos: refreshed 1 in-memory libraries from API
2026/07/12 16:50:31 DEBUG : iclouddrive photos: user album query failed for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool
2026/07/12 16:50:31 ERROR : error listing: query user albums for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool
2026/07/12 16:50:31 DEBUG : 3 go routines active
2026/07/12 16:50:31 NOTICE: Failed to lsd with 2 errors: last error was: query user albums for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool
rclone -vv ls iphotos:PrimarySync/
2026/07/12 16:52:41 DEBUG : Setting --config "rclone-standalone.conf" from environment variable RCLONE_CONFIG="rclone-standalone.conf"
2026/07/12 16:52:41 DEBUG : rclone: Version "v1.75.0-beta.9911.c6cdb8993" starting with parameters ["rclone" "-vv" "ls" "iphotos:PrimarySync/"]
2026/07/12 16:52:41 DEBUG : Creating backend with remote "iphotos:PrimarySync/"
2026/07/12 16:52:41 DEBUG : Using config file from "C:\\Users\\Leo\\Downloads\\rclone-beta-latest-windows-amd64\\rclone-v1.75.0-beta.9911.c6cdb8993-windows-amd64\\rclone-standalone.conf"
2026/07/12 16:52:41 DEBUG : iclouddrive: reusing session with cached endpoints
2026/07/12 16:52:42 DEBUG : iclouddrive photos: refreshed 1 libraries from API
2026/07/12 16:52:42 DEBUG : fs cache: renaming cache item "iphotos:PrimarySync/" to be canonical "iphotos:PrimarySync"
2026/07/12 16:52:43 DEBUG : iclouddrive photos: refreshed 1 in-memory libraries from API
2026/07/12 16:52:43 DEBUG : iclouddrive photos: user album query failed for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool
2026/07/12 16:52:43 DEBUG : 3 go routines active
2026/07/12 16:52:43 NOTICE: Failed to ls: query user albums for zone "PrimarySync": json: cannot unmarshal number into Go struct field ckBoolField.records.fields.isDeleted.value of type bool

hi, for a deeper look, try --dump flags

Hi, what flags do you suggest to use and what should I look for?

This is definitely a bug.

If you could do your failing command with -vv --dump bodies --low-level-retries 1 --retries 1 that will show the response rclone can't parse.

If you could put that in a GitHub issue along with the initial comment you wrote here we can take a look - thank you.

@leo here is a speculative fix for the problem. It is speculative because I need to see the output of --dump bodies to be certain it is correct, but it is the most likely thing - namely Apple are sending true/false or 1/0 for the deleted field.

v1.75.0-beta.9945.d3f9a705b.fix-iclouddrive-album-isdeleted on branch fix-iclouddrive-album-isdeleted (uploaded in 15-30 mins)

Let me know how you get on. If it works for you no need to make an issue!

Hi Nick,
I'm sorry for the delayed reply.

It's very strange. I tested the version that you suggested and it worked, however, then I tried the current release version and it's also working. So it seems like the issue got resolved by itself, maybe it was something on Apple's side.

If I encounter this issue again, I will post output of --dump bodies, but for now I think we can consider it solved. Thank you for the help!

It turns out I saved the output of --dump bodies when there was the error in my Notepad. I will clean it up and post it a little bit later, I think it still can be useful.

Thanks for testing @leo

Maybe it was just a bug...

If you can't reproduce it I'm inclined to let sleeping dogs lie but if you want me to take a look at the log share a link here or email info@rclone.com with the log and a link to the forum post and I'll get it.

Thanks

I sent the sanitized dump to your email just in case it contains something useful