# Sync to iCloud gives "Index has invalid data" errors

**URL:** <https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852>\
**Category:** Suspected Bug\
**Created:** [May 28, 2026, 4:47pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852 "2026-05-28T16:47:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [May 28, 2026, 4:47pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/1 "2026-05-28T16:47:46Z")

</div>

#### What is the problem you are having with rclone?

When I try to sync to an iCloud photos remote, I get "Index has invalid data" errors.

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

```auto
$ rclone version
rclone v1.74.2
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.8.0-117-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.26.3
- go/linking: static
- go/tags: none

```

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

```bash
rclone -vv --log-file ~/bug.log sync icloud-andrex-photos: /home/share/cloud/icloud-andrex-photos

```

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

```auto
[google-jenand]
type = drive
scope = drive.readonly
token = xxx
team_drive = 

[google-andrex]
type = drive
scope = drive.readonly
token = xxx
team_drive = 

[google-twicefooled]
type = drive
scope = drive.readonly
token = xxx
team_drive = 

[icloud-jenny-drive]
type = iclouddrive
apple_id = xxx
password = xxx
_auth_session = 
cookies = xxx
trust_token = xxx

[icloud-jenny-photos]
type = iclouddrive
service = photos
apple_id = xxx
password = xxx
_auth_session = 
cookies = xxx
trust_token = xxx

[icloud-andrex-drive]
type = iclouddrive
apple_id = xxx
password = xxx
cookies = xxx
_auth_session = 
trust_token = xxx

[icloud-andrex-photos]
type = iclouddrive
service = photos
apple_id = xxx
password = xxx
_auth_session = 
cookies = xxx
trust_token = xxx

```

#### A log from the command with the `-vv` flag

> <https://gist.github.com/andrew-schulman/251545f70c19f02dc72187f4db2bbeeb>

---

<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:** [May 28, 2026, 4:52pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/2 "2026-05-28T16:52:35Z")

</div>

welcome to the forum,

that debug log is not complete. in the end, are all the files synced or not?

* * *

can you find a simpler command to test, such as  
`rclone lsd icloud-andrex-photos: -vv`

---

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [May 28, 2026, 5:01pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/3 "2026-05-28T17:01:45Z")

</div>

I pasted the whole debug log, but it's 3 MB. Pastebin would only accept the first 512 KB. Gist claimed to accept the whole thing. However, you can see the error starting on line 14 of the log.

I can't really tell if all of the files are synced or not.

This command works:

```auto
$ rclone lsd icloud-andrex-photos:PrimarySync
          -1 2026-05-28 12:58:26 103 1831
          -1 2026-05-28 12:58:26 2338 All Photos
          -1 2026-05-28 12:58:26 1 Animated
          -1 2026-05-28 12:58:26 1 Bursts
          -1 2026-05-28 12:58:26 103 Favorites
          -1 2026-05-28 12:58:26 25 Francoise
          -1 2026-05-28 12:58:26 0 Hidden
          -1 2026-05-28 12:58:26 53 Live
          -1 2026-05-28 12:58:26 0 Long Exposure
          -1 2026-05-28 12:58:26 7 Panoramas
          -1 2026-05-28 12:58:26 8 Portrait
          -1 2026-05-28 12:58:26 60 Recently Deleted
          -1 2026-05-28 12:58:26 29 Roxy
          -1 2026-05-28 12:58:26 41 Screenshots
          -1 2026-05-28 12:58:26 5 Seek
          -1 2026-05-28 12:58:26 1 Seek Thermal
          -1 2026-05-28 12:58:26 0 Slo-mo
          -1 2026-05-28 12:58:26 0 Time-lapse
          -1 2026-05-28 12:58:26 0 VIOFO
          -1 2026-05-28 12:58:26 192 Videos
          -1 2026-05-28 12:58:26 1 WhatsApp
          -1 2026-05-28 12:58:26 9 bike
          -1 2026-05-28 12:58:26 8 drawing
          -1 2026-05-28 12:58:26 89 recipes

```

But this one gives the error:

```auto
$ rclone ls icloud-andrex-photos:
2026/05/28 12:58:44 NOTICE: Failed to ls: query user albums for zone "CMM-4E0D3A72-AE76-4357-8276-5ACA2A0D2183": HTTP error 400 (400 Bad Request) returned body: "{\n \"uuid\" : \"4b6a427d-a18f-4de8-8aec-be09eb4fcea6\",\n \"serverErrorCode\" : \"BAD_REQUEST\",\n \"reason\" : \"Index has invalid data\",\n \"errorClass\" : \"BAD_REQUEST\",\n \"error\" : \"BAD_REQUEST\"\n}"

```

---

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [May 28, 2026, 5:04pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/4 "2026-05-28T17:04:05Z")

</div>

Forgot to mention that I tried removing the local cache directory (`rm -rf ~/.cache/rclone/iclouddrive-photos/icloud-andrex-photos/`), and also reathenticating to icloud (`rclone config reconnect icloud-andrex-photos:`). Neither one fixed the problem.

---

<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:** [May 28, 2026, 5:10pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/5 "2026-05-28T17:10:26Z")

</div>

need to post full **DEBUG** output for each command, not snippets.

and for a deeper look `--dump=bodies`

---

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [May 28, 2026, 5:31pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/6 "2026-05-28T17:31:57Z")

</div>

Trying again.

```auto
$ rclone --dump=bodies --log-file ~/bug.log ls icloud-andrex-photos:

```

Log output is in [gist:e8ba3253ab703ba77dfea2e1749fd89f · GitHub](https://gist.github.com/andrew-schulman/e8ba3253ab703ba77dfea2e1749fd89f).

---

<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:** [May 28, 2026, 6:28pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/7 "2026-05-28T18:28:23Z")

</div>

as i mentioned, try `rclone lsd` for a smaller log file.

and do you have the same issue with `icloud-jenny-photos` ?

---

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [May 28, 2026, 7:03pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/8 "2026-05-28T19:03:21Z")

</div>

`rclone lsd icloud-andrex-photos:` succeeds.

```auto
$ rclone --dump=bodies --log-file ~/bug.log lsd icloud-andrex-photos:
          -1 2026-05-28 14:57:50 0 CMM-11A44FA2-C02E-4109-90B4-246073ECD192
          -1 2026-05-28 14:57:50 0 CMM-4E0D3A72-AE76-4357-8276-5ACA2A0D2183
          -1 2026-05-28 14:57:50 0 PrimarySync

```

Log is in [gist:887527895d3753a25981d92c2f334aa9 · GitHub](https://gist.github.com/andrew-schulman/887527895d3753a25981d92c2f334aa9). There are no errors in it.

No, I don't get the error with any of the other 3 icloud configurations.

---

<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:** [May 28, 2026, 7:52pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/9 "2026-05-28T19:52:22Z")

</div>

Do any of your album names have `/` in? There is a bug report that they don't work.

---

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [May 29, 2026, 12:37pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/10 "2026-05-29T12:37:08Z")

</div>

No. There are no album names with `/` in them. Just alphanumeric characters and spaces.

---

<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:** [May 31, 2026, 8:45am UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/11 "2026-05-31T08:45:24Z")

</div>

It looks like from your log that rclone is trying to treat some things which aren't photo albums as photo albums (the `CMM-*` entries - shared moments maybe?).

Try this which ignores them

[v1.75.0-beta.9783.5a11bb553.fix-icloud-photos-cmm-zones](https://beta.rclone.org/branch/fix-icloud-photos-cmm-zones/v1.75.0-beta.9783.5a11bb553.fix-icloud-photos-cmm-zones/) on branch [fix-icloud-photos-cmm-zones](https://github.com/rclone/rclone/tree/fix-icloud-photos-cmm-zones) (uploaded in 15-30 mins)

---

<div class="post-metadata">

**Author:** ![andrex](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@andrex](https://forum.rclone.org/u/andrex)\
**Post date:** [June 1, 2026, 10:17am UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/12 "2026-06-01T10:17:12Z")

</div>

Confirmed that that build fixes the problem. The errors are gone, and `rclone ls` and `rclone sync` finish successfully. Thanks!

---

<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:** [June 1, 2026, 4:12pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/13 "2026-06-01T16:12:48Z")

</div>

Thanks for testing @andrex

I've merged this to master now which means it will be in [the latest beta](https://beta.rclone.org/) in 15-30 minutes and released in v1.74.3

---

<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:** [July 1, 2026, 4:12pm UTC](https://forum.rclone.org/t/sync-to-icloud-gives-index-has-invalid-data-errors/53852/14 "2026-07-01T16:12:49Z")

</div>

Closed on July 1, 2026, 4:12pm UTC

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