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

**URL:** <https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028>\
**Category:** Suspected Bug\
**Created:** [July 12, 2026, 1:55pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028 "2026-07-12T13:55:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo](https://forum.rclone.org/user_avatar/forum.rclone.org/leo/32/2192_2.png) [@leo](https://forum.rclone.org/u/leo)\
**Post date:** [July 12, 2026, 1:55pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/1 "2026-07-12T13:55:29Z")

</div>

#### 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:

```auto
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

```

```auto
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:

```auto
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.

```auto
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`)

```auto
rclone lsd iphotos:PrimarySync/

```

```auto
rclone ls iphotos:PrimarySync/

```

#### The rclone config contents with secrets removed.

```auto
[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

```auto
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

```

```auto
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

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [July 12, 2026, 6:16pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/2 "2026-07-12T18:16:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leo](https://forum.rclone.org/user_avatar/forum.rclone.org/leo/32/2192_2.png) [@leo](https://forum.rclone.org/u/leo)\
**Post date:** [July 13, 2026, 8:42pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/3 "2026-07-13T20:42:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [July 13, 2026, 8:57pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/4 "2026-07-13T20:57:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [July 14, 2026, 1:41pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/5 "2026-07-14T13:41:16Z")

</div>

@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](https://beta.rclone.org/branch/fix-iclouddrive-album-isdeleted/v1.75.0-beta.9945.d3f9a705b.fix-iclouddrive-album-isdeleted/) on branch [fix-iclouddrive-album-isdeleted](https://github.com/rclone/rclone/tree/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!

---

<div class="post-metadata">

**Author:** ![leo](https://forum.rclone.org/user_avatar/forum.rclone.org/leo/32/2192_2.png) [@leo](https://forum.rclone.org/u/leo)\
**Post date:** [July 17, 2026, 8:46pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/6 "2026-07-17T20:46:43Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![leo](https://forum.rclone.org/user_avatar/forum.rclone.org/leo/32/2192_2.png) [@leo](https://forum.rclone.org/u/leo)\
**Post date:** [July 17, 2026, 9:02pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/7 "2026-07-17T21:02:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [July 19, 2026, 3:24pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/8 "2026-07-19T15:24:20Z")

</div>

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](mailto:info@rclone.com) with the log and a link to the forum post and I'll get it.

Thanks

---

<div class="post-metadata">

**Author:** ![leo](https://forum.rclone.org/user_avatar/forum.rclone.org/leo/32/2192_2.png) [@leo](https://forum.rclone.org/u/leo)\
**Post date:** [July 20, 2026, 3:46pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/9 "2026-07-20T15:46:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [August 19, 2026, 3:47pm UTC](https://forum.rclone.org/t/error-when-trying-to-list-contents-of-primarysync-directory-in-icloud-photos/54028/10 "2026-08-19T15:47:23Z")

</div>

Closed on August 19, 2026, 3:47pm UTC

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