Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting app_sync failure #592

Open
4 tasks done
gsong opened this issue Dec 16, 2024 · 25 comments
Open
4 tasks done

Getting app_sync failure #592

gsong opened this issue Dec 16, 2024 · 25 comments
Labels
class(bug) Something isn't working status(investigating) Currently looking for the root cause of the issue status(previewed) This issue or pull request should be fixed in a released beta version

Comments

@gsong
Copy link

gsong commented Dec 16, 2024

Describe the issue

ADP is off, this is just a regular iCloud account. I've successfully synced before but for some reason it's failing now, after entering MFA info.

-----------------------------------------------------------------------------------------------
Welcome to icloud-photos-sync, v.1.4.0-nightly.8!
Made with <3 by steilerDev
-----------------------------------------------------------------------------------------------
Authenticating user...
Device trusted
Sign in successful!
Error: APP_SYNC: Sync failed caused by AUTH_FAILED: iCloud Authentication failed caused by ICLOUD_PHOTOS_SETUP_FAILED: Unable to get iCloud Photos service ready caused by ICLOUD_PHOTOS_SETUP_ERROR: Unexpected error while setting up iCloud Photos caused by VALIDATOR_PHOTOS_SETUP_RESPONSE: Unable to parse and validate photos setup response (must match pattern "^(PrimarySync|SharedSync(-[0-9A-F?]+)+|CMM(-[0-9A-F]+)+)$" (/data/zones/1/zoneID/zoneName)) (error code: 7faeaca9-e2d8-4071-ae2e-3dda86a72fa6)

How to reproduce the behavior?

Run sync using nightly docker image.

Error Code

7faeaca9-e2d8-4071-ae2e-3dda86a72fa6

Relevant log output

[2024-12-16T15:33:34.631Z] DEBUG EventManager: Registering listener for event log-info from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event log-warn from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event warn-count_mismatch from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event warn-filetype_error from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event warn-library_load_error from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event warn-extraneous_file from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event warn-icloud_load_error from source LogInterface
[2024-12-16T15:33:34.632Z] DEBUG EventManager: Registering listener for event warn-write_asset_error from source LogInterface
[2024-12-16T15:33:34.633Z] DEBUG EventManager: Registering listener for event warn-write_album_error from source LogInterface
[2024-12-16T15:33:34.633Z] DEBUG EventManager: Registering listener for event warn-link_error from source LogInterface
[2024-12-16T15:33:34.633Z] DEBUG EventManager: Registering listener for event warn-mfa_error from source LogInterface
[2024-12-16T15:33:34.633Z] DEBUG EventManager: Registering listener for event warn-resource_file_error from source LogInterface
[2024-12-16T15:33:34.633Z] DEBUG EventManager: Registering listener for event warn-archive_asset_error from source LogInterface
[2024-12-16T15:33:34.633Z] DEBUG EventManager: Registering listener for event sync-retry from source LogInterface
[2024-12-16T15:33:34.634Z] DEBUG EventManager: Registering listener for event log-error from source LogInterface
[2024-12-16T15:33:34.634Z] DEBUG EventManager: Registering listener for event error-handled from source LogInterface
[2024-12-16T15:33:34.637Z] DEBUG EventManager: Registering listener for event warn-mfa_error from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event warn-filetype_error from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event warn-resource_file_error from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event error-handled from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event icloud-auth_started from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event icloud-auth_done from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event icloud-mfa_req from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event icloud-trusted from source CLIInterface
[2024-12-16T15:33:34.638Z] DEBUG EventManager: Registering listener for event icloud-account_ready from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event icloud-session_expired from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event icloud-pcs_req from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event icloud-pcs_not_ready from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event mfa-started from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event mfa-resend from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event mfa-received from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event mfa-not_provided from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event photos-setup-complete from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event photos-ready from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event token from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event scheduled from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event scheduled-done from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event scheduled-retry from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event scheduled-overrun from source CLIInterface
[2024-12-16T15:33:34.639Z] DEBUG EventManager: Registering listener for event sync-start from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-fetch_n_load from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-fetch_n_load_completed from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-diff from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-diff_completed from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write_assets from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write_asset_completed from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event warn-write_asset_error from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write_assets_completed from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write_albums from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write_albums_completed from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-write_completed from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-done from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event sync-retry from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event archive-start from source CLIInterface
[2024-12-16T15:33:34.640Z] DEBUG EventManager: Registering listener for event archive-persist_start from source CLIInterface
[2024-12-16T15:33:34.641Z] DEBUG EventManager: Registering listener for event archive-remote_delete from source CLIInterface
[2024-12-16T15:33:34.641Z] DEBUG EventManager: Registering listener for event archive-done from source CLIInterface
[2024-12-16T15:33:36.074Z] DEBUG EventManager: Registering listener for event photos-ready from source iCloud
[2024-12-16T15:33:36.075Z] DEBUG EventManager: Registering listener for event mfa-not_provided from source iCloud
[2024-12-16T15:33:36.075Z] DEBUG EventManager: Registering listener for event icloud-error from source iCloud
[2024-12-16T15:33:36.075Z] DEBUG EventManager: Registering listener for event mfa-error from source iCloud
[2024-12-16T15:33:36.076Z] INFO iCloud: Authenticating user
[2024-12-16T15:33:36.114Z] INFO iCloud: Generating SRP challenge
[2024-12-16T15:33:36.300Z] DEBUG HeaderJar: Extracted scnt from response header with length 446
[2024-12-16T15:33:37.594Z] DEBUG HeaderJar: Extracted cookie from response header: dslang (domain apple.com) with length 5
[2024-12-16T15:33:37.599Z] DEBUG HeaderJar: Extracted cookie from response header: site (domain apple.com) with length 3
[2024-12-16T15:33:37.602Z] DEBUG HeaderJar: Extracted cookie from response header: aasp (domain idmsa.apple.com) with length 240
[2024-12-16T15:33:37.661Z] DEBUG ResourceManager: Reading resource file from /opt/icloud-photos-library/.icloud-photos-sync
[2024-12-16T15:33:38.273Z] DEBUG HeaderJar: Extracted scnt from response header with length 446
[2024-12-16T15:33:38.275Z] DEBUG HeaderJar: Extracted cookie from response header: dslang (domain apple.com) with length 5
[2024-12-16T15:33:38.275Z] DEBUG HeaderJar: Extracted cookie from response header: site (domain apple.com) with length 3
[2024-12-16T15:33:38.278Z] DEBUG HeaderJar: Extracted cookie from response header: acn01 (domain apple.com) with length 0
[2024-12-16T15:33:38.279Z] DEBUG NetworkManager: Setting session secret to +le+Ec79Y62U72iYzgRi36cbGEyvIagt4PQY3yZOJVNJfoaI9P+Hl7Lf9a4Pk3LOkJrpr780Wua7wft7OfiT9h3TnISxULEbvhllueGMd3MmM2Q1K5v1lBlUbRYGfujjce8KQCQKBjJr3ivXkbMeodIx7ddm4oYdSp1WMgadtlcX4XQ9moBgybXLhXHYEkZ7hrLkHo4fOn6ym/n3emStAEKf7qdpEQoJAtauoZnkTdDWozgkDRGRYViEZLygXypwieD5vCSjxH63qG1cu4lewPmWahVfqFImjNod5AtndAaSxkmZn9Mye4VmCM4vMOJ9odEpTQcVPf3vm060ih744lFWB7nCX/NeCUb0FRug6tPjGdOBLnDGVRNcGUKuMdhPtcfDG254lUMf6mtG2KY6ecBPLgcGseLoBcvHpw2IlSfOlt+50nQzDZZE9aVnN2O2XfzmOAU/Gln0TDW+8CbAzr2FYfxZ+UG7VveLc4BLVHUWoQ+bkt18Vf8wGPhduhnYhYfl13yAz11+nkvKH66mn9m2mk2C3+cmvi2whvenPgpFdLEDcq9YfWw3OBgxeFEc042ogxEgzYG49ZJIKSa3wI+0FI3w+UrnuqWHsykTzTcOirt+FhgqLkNCI4tSwZy64s+e00GY+XsvB52TmHCcn5bn1fQSH6mFbPY7MK/AVqsCYpmsSREDfaphz5nWtDu1y3kO7Rf/YtICxkQF6eRZJeYnzKdU0cAcjON4APja1MY5qau/S5i/i8OU0RKWtT8NZ4LKFHD2wUgB0bv3BqmYOEYeTDFKmcJIU2rhJpc4pJb/7dlFGtjaptMOn2NTB7jMjnZmPUk+kCaDmb2cen3Kn234nYY6if4AQ15rT3fPXdupiC7marN7goy06FKkbcmjwmj6RJnq7LKJJkrhvLMp/xbq8tmvMxF5tVOjIH7znRq1KF4ZcJv4KXC242T+qYJvOQAQQkpevguj
[2024-12-16T15:33:38.280Z] DEBUG iCloud: Acquired signin secrets
[2024-12-16T15:33:38.280Z] DEBUG iCloud: Response status is 200, authentication successful - device trusted
[2024-12-16T15:33:38.280Z] DEBUG ResourceManager: Reading resource file from /opt/icloud-photos-library/.icloud-photos-sync
[2024-12-16T15:33:38.280Z] INFO iCloud: Setting up iCloud connection
[2024-12-16T15:33:40.446Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Documents (domain icloud.com) with length 210
[2024-12-16T15:33:40.448Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Photos (domain icloud.com) with length 210
[2024-12-16T15:33:40.448Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Cloudkit (domain icloud.com) with length 210
[2024-12-16T15:33:40.448Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Safari (domain icloud.com) with length 210
[2024-12-16T15:33:40.448Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Mail (domain icloud.com) with length 210
[2024-12-16T15:33:40.449Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Notes (domain icloud.com) with length 210
[2024-12-16T15:33:40.449Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-News (domain icloud.com) with length 210
[2024-12-16T15:33:40.449Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-PCS-Sharing (domain icloud.com) with length 210
[2024-12-16T15:33:40.450Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-HSA-LOGIN (domain icloud.com) with length 0
[2024-12-16T15:33:40.450Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-UNIQUE-CLIENT-ID (domain icloud.com) with length 6
[2024-12-16T15:33:40.450Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-LOGIN (domain icloud.com) with length 220
[2024-12-16T15:33:40.450Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-VALIDATE (domain icloud.com) with length 220
[2024-12-16T15:33:40.450Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-TOKEN (domain icloud.com) with length 220
[2024-12-16T15:33:40.450Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-USER (domain icloud.com) with length 21
[2024-12-16T15:33:40.451Z] DEBUG HeaderJar: Extracted cookie from response header: X_APPLE_WEB_KB-ZNLBKGIMTBRIRO734AC-ZAHQXHW (domain icloud.com) with length 220
[2024-12-16T15:33:40.451Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-DS-WEB-SESSION-TOKEN (domain icloud.com) with length 806
[2024-12-16T15:33:40.452Z] DEBUG NetworkManager: Setting photosUrl to https://p107-ckdatabasews.icloud.com:443
[2024-12-16T15:33:40.452Z] DEBUG iCloud: Account ready
[2024-12-16T15:33:40.452Z] INFO iCloud: Getting iCloud Photos Service ready
[2024-12-16T15:33:40.452Z] DEBUG iCloudPhotos: Getting iCloud Photos account information
[2024-12-16T15:33:40.967Z] DEBUG HeaderJar: Extracted cookie from response header: X-APPLE-WEBAUTH-TOKEN (domain icloud.com) with length 220
[2024-12-16T15:33:40.976Z] DEBUG NetworkManager: Settling rate limiter queue...
[2024-12-16T15:33:40.976Z] DEBUG NetworkManager: Queue has settled!
[2024-12-16T15:33:40.976Z] DEBUG NetworkManager: Settling CCY limiter queue...
[2024-12-16T15:33:40.976Z] DEBUG NetworkManager: Queue has settled!
[2024-12-16T15:33:40.977Z] DEBUG EventManager: Removed 3 listeners for source iCloudPhotos
[2024-12-16T15:33:40.977Z] DEBUG EventManager: No more listeners for source iCloudPhotos registered
[2024-12-16T15:33:40.977Z] DEBUG EventManager: Removed 12 listeners for source iCloud
[2024-12-16T15:33:40.977Z] DEBUG EventManager: No more listeners for source iCloud registered
[2024-12-16T15:33:40.981Z] INFO ErrorHandler: Handling error APP_SYNC caused by VALIDATOR_PHOTOS_SETUP_RESPONSE
[2024-12-16T15:33:41.739Z] ERROR RuntimeError: APP_SYNC: Sync failed caused by AUTH_FAILED: iCloud Authentication failed caused by ICLOUD_PHOTOS_SETUP_FAILED: Unable to get iCloud Photos service ready caused by ICLOUD_PHOTOS_SETUP_ERROR: Unexpected error while setting up iCloud Photos caused by VALIDATOR_PHOTOS_SETUP_RESPONSE: Unable to parse and validate photos setup response (must match pattern "^(PrimarySync|SharedSync(-[0-9A-F?]+)+|CMM(-[0-9A-F]+)+)$" (/data/zones/1/zoneID/zoneName)) (error code: a30731ef-baad-4d41-9f85-c41e324c94f3)

Operating system

macOS 15.2

Execution environment

docker

icloud-photos-sync version

1.3.0 and 1.4.0-nightly.8

Checklist

@gsong gsong added class(bug) Something isn't working status(open) A new issue - not yet classified labels Dec 16, 2024
@player666au
Copy link

I have this issue too. Looks to be exactly the same final error shown in the log

@timvahlbrock
Copy link

I don't receive this error (running on 1.3.0), but I also have a third zone listed by iCloud. It is identical in terms of ownerRecordName and zoneType to the Primary and SharedZone, but the zone name is just some ID and therefore doesn't match the regex from the error message. It seems like that this zone corresponds to a sharable iCloud Link, because when I create another sharable link, I get another one of those zones. The names of both start with "CMM"

@steilerDev
Copy link
Owner

I'm getting the same now as well - seems there is an additional zone added after having Apple "Intelligence" enabled for a short while: AppLibrarySync-com.apple.GenerativePlayground-00000000-0000-0000-0000-000000000001

@timvahlbrock the CMM zone should be covered - do you know which zone is causing problems on your end?

@timvahlbrock
Copy link

@timvahlbrock the CMM zone should be covered - do you know which zone is causing problems on your end?

Haven't got any problems myself, just saw that the users here were using a nightly build, discovered the CMM zones when debugging for other feature requests and thought that maybe the nightly build had issues with those CMM zones. But no problems on my end.

@idominiki
Copy link

Same problem here

@steilerDev
Copy link
Owner

@timvahlbrock and I are currently trying to get this repo back to life (not updating dependencies adds a lot of tech debt :/ )

I hope to be able to get to fix this soon (the fix itself is very straight forward....)

@gsong
Copy link
Author

gsong commented Feb 7, 2025

@timvahlbrock and I are currently trying to get this repo back to life (not updating dependencies adds a lot of tech debt :/ )

I hope to be able to get to fix this soon (the fix itself is very straight forward....)

Best of luck! Let us know how we can help.

@steilerDev
Copy link
Owner

I've pushed 1.4.0-nightly.23 which should resolve this issue - this also includes a bunch of dependency updates and other things!

Unfortunately I can't get the API / E2E tests working at the moment - I'm fearing that Apple might have increased rate limits (because the failures seem intermittent with error code 503: AUTH_SRP_INIT_FAILED: Unable to initialize SRP authentication protocol caused by Request failed with status code 503)

Not quite sure...

@steilerDev
Copy link
Owner

hmmm - maybe the issue is related to the SRP login - using LEGACY_LOGIN seems to work reliably

@player666au
Copy link

Worked for me.

Thanks you!

@steilerDev
Copy link
Owner

with or without LEGACY_LOGIN @player666au ?

@player666au
Copy link

I have no environment variable for LEGACY_LOGIN in my docker compose file, nor a command line option specified.

So I think not.

(logging has stopped working so hard to be absolutely sure, but I have never tried legacy-login)

@gsong
Copy link
Author

gsong commented Feb 12, 2025

with or without LEGACY_LOGIN @player666au ?

With the latest nightly image, I'm still getting the following error, with or without LEGACY_LOGIN set to true.

Error: APP_SYNC: Sync failed caused by AUTH_FAILED: iCloud Authentication failed caused by AUTH_UNEXPECTED_RESPONSE: Unexpected HTTP response caused by Request failed with status code 503 (error code: d6e38867-e2bd-4542-9971-9395dc69e04d)

I tested on one account with ADP turned on, and one account with ADP off. Both get this error message immediately. The error codes are different, but I think that's unique for each run.

@steilerDev
Copy link
Owner

I need to check in with @foxt - he reverse engineered the SRP protocol and I'm using his library. There was a patch release so I want to make sure it's not my implementation causing the (server) error....

Yes - the error code is a uuid that is attached to the error report that get send to Backtrace - this way I can find technical details to your crash 🙃

Have you tried LEGACY_LOGIN @gsong ?

@gsong
Copy link
Author

gsong commented Feb 12, 2025

Have you tried LEGACY_LOGIN?

I set it as as a envvar in docker-compose:

services:
  photos-sync:
    image: steilerdev/icloud-photos-sync:nightly
    container_name: photos-sync-george
    user: 501:20
    environment:
      APPLE_ID_USER: "george@damacy.net"
      APPLE_ID_PWD: "Wa1kAroundTheBlock"
      TZ: "US/Pacific"
      SCHEDULE: "* 2 * * *"
      ENABLE_CRASH_REPORTING: true
      LEGACY_LOGIN: true
    volumes:
      - ./data:/opt/icloud-photos-library

That didn't work.

@steilerDev steilerDev mentioned this issue Feb 12, 2025
4 tasks
@steilerDev
Copy link
Owner

I've had the latest nightly on a daily schedule and it seems to work - this might actually be rate limiting on login requests, will need to dig further

@steilerDev steilerDev added status(investigating) Currently looking for the root cause of the issue and removed status(open) A new issue - not yet classified labels Feb 13, 2025
@steilerDev
Copy link
Owner

When I try to log in, log out and back in on the website, I'm now also getting 503's - which indicates that this is a security measure by Apple?

Image

@steilerDev
Copy link
Owner

But this one is new I think:

Image

@steilerDev
Copy link
Owner

Quickly implementing the "logout" function and...

Image

steilerDev added a commit that referenced this issue Feb 13, 2025
@steilerDev
Copy link
Owner

Image

😭

Can you still try and see if 1.4.0-nightly.27 makes it more reliable?

@steilerDev
Copy link
Owner

i've added a bunch of waits as well as reduced the amount of request to login, which "resolved" the issue.

This is very likely a rate limiting feature from apple. The long term fix is probably to more aggressively persist cookies (instead of the current strategy, which re-authenticates before each execution)

@timvahlbrock
Copy link

The long term fix is probably to more aggressively persist cookies (instead of the current strategy, which re-authenticates before each execution)

Maybe this would have the additional benefit that one doesn't get an email about the login every time the sync runs.

Copy link

This issue should be resolved with version v1.4.0-beta.2, please confirm.

@github-actions github-actions bot added the status(previewed) This issue or pull request should be fixed in a released beta version label Feb 13, 2025
@gsong
Copy link
Author

gsong commented Feb 28, 2025

@steilerDev I was able to try the new nightly image and successfully sync once. But subsequent tries results in:

$ docker compose up -d --wait --pull always; caffeinate docker compose exec photos-sync icloud-photos-sync sync
[+] Running 1/1
 ✔ photos-sync Pulled                                                          0.8s
[+] Running 1/1
 ✔ Container photos-sync-george  Healthy                                       0.5s
------------------------------------------------------------------------------------
Welcome to icloud-photos-sync, v.1.4.0-nightly.35!
Made with <3 by steilerDev
------------------------------------------------------------------------------------
Authenticating user...
Device trusted
Advanced Data Protection requires additional cookies, acquiring...
Error: APP_SYNC: Sync failed caused by AUTH_FAILED: iCloud Authentication failed caused by AUTH_PCS_REQUEST_FAILED: Unable to acquire PCS cookies caused by Request failed with status code 500 (error code: 28f432e5-ea89-4bb5-80fe-5438ee4e75d0)

Same results with the beta image:

$ docker compose up -d --wait --pull always; caffeinate docker compose exec photos-sync icloud-photos-sync sync
[+] Running 1/1
 ✔ photos-sync Pulled                                                          0.8s
[+] Running 1/1
 ✔ Container photos-sync-george  Healthy                                       0.5s
------------------------------------------------------------------------------------
Welcome to icloud-photos-sync, v.1.4.0-beta.2!
Made with <3 by steilerDev
------------------------------------------------------------------------------------
Authenticating user...
Device trusted
Advanced Data Protection requires additional cookies, acquiring...
Error: APP_SYNC: Sync failed caused by AUTH_FAILED: iCloud Authentication failed caused by AUTH_PCS_REQUEST_FAILED: Unable to acquire PCS cookies caused by Request failed with status code 500 (error code: ef1d04e4-a19e-4b48-afc8-1d27b9686baf)

Tip

Current workaround is to delete data/.icloud-photo-sync and login again.

@steilerDev
Copy link
Owner

It seems this is some sort of rate limiting on Apple's side - the only long term solution is a more aggressive caching of cookies (the current approach is to start as clean as possible after each execution)

However a nightly sync is working without any issues for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class(bug) Something isn't working status(investigating) Currently looking for the root cause of the issue status(previewed) This issue or pull request should be fixed in a released beta version
Projects
None yet
Development

No branches or pull requests

5 participants