Closed BackedUpBooty closed 10 months ago
Thanks, I've updated the guide to replace 2FA with MFA. I've changed it over recently as I feel MFA is a more accurate description.
You just want to initialise your container again. I had the same thing happen last night. Logging in to Apple's server too many times in quick succession seems to trigger an MFA re-authentication. If I restart my container 5 or 10 times in an hour, I get forced to MFA auth again. Same if I set the sync interval to be hourly, which is why I force the sync intervals now with the minimum being 4hrs.
So my sync interval is every 12 hours and I don't restart the container at all.
I reinitialized and it was able to check the files for sync, however 12 hours later it failed again (I've included logs from where I reinitialized and then the next attempt to sync, you can see the login count has increased by 1 from 3 to 4, so it's not like I'm spamming it with auth). Any other suggestions for why this might be happening?
2023-08-04T01:11:20.219059042Z 2023-08-04 10:11:20 INFO Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please be patient. Nothing is being downloaded at this time
2023-08-04T01:11:20.748379992Z 2023-08-04 10:11:20 DEBUG Switched to icloudpd: 1.14.5
2023-08-04T01:11:22.342051068Z 0: SMS to ******xxx
2023-08-04T01:11:22.342482558Z 1: SMS to *******xxx
2023-08-04T01:11:22.342535497Z 2: Enter two-factor authentication code
2023-08-04T01:11:22.449106140Z Please choose an option: [0]: 2023-08-04 10:11:22 ERROR Failed check for new files files
2023-08-04T01:11:22.449669674Z 2023-08-04 10:11:22 ERROR - Can you log into icloud.com without receiving pop-up notifications?
2023-08-04T01:11:22.450818455Z 2023-08-04 10:11:22 ERROR Error debugging info:
2023-08-04T01:11:22.452905690Z 2023-08-04 10:11:22 ERROR Aborted!
2023-08-04T01:11:22.454911838Z 2023-08-04 10:11:22 ERROR ***** Please report problems here: https://github.com/boredazfcuk/docker-icloudpd/issues *****
2023-08-04T01:11:22.456028694Z 2023-08-04 10:11:22 INFO Sending Pushover failure notification
2023-08-04T01:11:23.151523901Z 2023-08-04 10:11:23 DEBUG Pushover failure notification sent successfully
2023-08-04T01:11:23.152356033Z 2023-08-04 10:11:23 DEBUG Web cookie exists.
2023-08-04T01:11:23.154143666Z 2023-08-04 10:11:23 INFO Web cookie expires: 2023-10-03 @ 01:11:21
2023-08-04T01:11:23.155026210Z 2023-08-04 10:11:23 INFO Two factor authentication cookie expires: 2023-10-29 @ 08:20:20
2023-08-04T01:11:23.155796266Z 2023-08-04 10:11:23 INFO Days remaining until expiration: 85
2023-08-04T01:11:23.156769595Z 2023-08-04 10:11:23 DEBUG iCloud login counter = 2
2023-08-04T01:11:23.159232923Z 2023-08-04 10:11:23 INFO Synchronisation ended at 10:11:23
2023-08-04T01:11:23.161030109Z 2023-08-04 10:11:23 INFO Total time taken: 00:00:03
2023-08-04T01:11:23.162670329Z 2023-08-04 10:11:23 INFO Next synchronisation at 22:11:20
2023-08-04T13:11:20.166184384Z 2023-08-04 22:11:20 INFO Synchronisation starting at 22:11:20
2023-08-04T13:11:20.172874960Z 2023-08-04 22:11:20 INFO Keyring file exists, continuing
2023-08-04T13:11:20.174094727Z 2023-08-04 22:11:20 DEBUG Check MFA Cookie
2023-08-04T13:11:20.175067682Z 2023-08-04 22:11:20 DEBUG Multi-factor authentication cookie exists.
2023-08-04T13:11:20.183127093Z 2023-08-04 22:11:20 DEBUG Valid two factor authentication cookie found. Days until expiration: 89
2023-08-04T13:11:20.184022952Z 2023-08-04 22:11:20 INFO Check download directory mounted correctly...
2023-08-04T13:11:20.239116085Z 2023-08-04 22:11:20 INFO Failsafe file /home/[redacted]/iCloud/.mounted exists, continuing
2023-08-04T13:11:20.241926147Z 2023-08-04 22:11:20 INFO Check for new files using password stored in keyring file
2023-08-04T13:11:20.242744073Z 2023-08-04 22:11:20 INFO Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please be patient. Nothing is being downloaded at this time
2023-08-04T13:11:20.797455431Z 2023-08-04 22:11:20 DEBUG Switched to icloudpd: 1.14.5
2023-08-04T13:25:58.423203126Z 2023-08-04 22:25:58 INFO Check successful
2023-08-04T13:25:58.424568188Z 2023-08-04 22:25:58 INFO No new files detected. Nothing to download
2023-08-04T13:25:58.425390213Z 2023-08-04 22:25:58 DEBUG Web cookie exists.
2023-08-04T13:25:58.427195662Z 2023-08-04 22:25:58 INFO Web cookie expires: 2023-10-03 @ 04:45:39
2023-08-04T13:25:58.428033598Z 2023-08-04 22:25:58 INFO Two factor authentication cookie expires: 2023-11-02 @ 04:46:07
2023-08-04T13:25:58.428833285Z 2023-08-04 22:25:58 INFO Days remaining until expiration: 89
2023-08-04T13:25:58.429681586Z 2023-08-04 22:25:58 DEBUG iCloud login counter = 3
2023-08-04T13:25:58.432123332Z 2023-08-04 22:25:58 INFO Synchronisation ended at 22:25:58
2023-08-04T13:25:58.433815943Z 2023-08-04 22:25:58 INFO Total time taken: 00:14:38
2023-08-04T13:25:58.435635275Z 2023-08-04 22:25:58 INFO Next synchronisation at 10:11:20
2023-08-05T01:11:20.438957839Z 2023-08-05 10:11:20 INFO Synchronisation starting at 10:11:20
2023-08-05T01:11:20.444476643Z 2023-08-05 10:11:20 INFO Keyring file exists, continuing
2023-08-05T01:11:20.445317334Z 2023-08-05 10:11:20 DEBUG Check MFA Cookie
2023-08-05T01:11:20.446499734Z 2023-08-05 10:11:20 DEBUG Multi-factor authentication cookie exists.
2023-08-05T01:11:20.451972477Z 2023-08-05 10:11:20 DEBUG Valid two factor authentication cookie found. Days until expiration: 88
2023-08-05T01:11:20.452837006Z 2023-08-05 10:11:20 INFO Check download directory mounted correctly...
2023-08-05T01:11:20.471028882Z 2023-08-05 10:11:20 INFO Failsafe file /home/[redacted]/iCloud/.mounted exists, continuing
2023-08-05T01:11:20.474118022Z 2023-08-05 10:11:20 INFO Check for new files using password stored in keyring file
2023-08-05T01:11:20.475055599Z 2023-08-05 10:11:20 INFO Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please be patient. Nothing is being downloaded at this time
2023-08-05T01:11:21.100336537Z 2023-08-05 10:11:21 DEBUG Switched to icloudpd: 1.14.5
2023-08-05T01:11:23.027628359Z 0: SMS to ******xxx
2023-08-05T01:11:23.028038488Z 1: SMS to *******xxx
2023-08-05T01:11:23.028081469Z 2: Enter two-factor authentication code
2023-08-05T01:11:23.110328275Z Please choose an option: [0]: 2023-08-05 10:11:23 ERROR Failed check for new files files
2023-08-05T01:11:23.111461275Z 2023-08-05 10:11:23 ERROR - Can you log into icloud.com without receiving pop-up notifications?
2023-08-05T01:11:23.112593694Z 2023-08-05 10:11:23 ERROR Error debugging info:
2023-08-05T01:11:23.114221091Z 2023-08-05 10:11:23 ERROR Aborted!
2023-08-05T01:11:23.115044705Z 2023-08-05 10:11:23 ERROR ***** Please report problems here: https://github.com/boredazfcuk/docker-icloudpd/issues *****
2023-08-05T01:11:23.116020133Z 2023-08-05 10:11:23 INFO Sending Pushover failure notification
2023-08-05T01:11:24.140268753Z 2023-08-05 10:11:24 DEBUG Pushover failure notification sent successfully
2023-08-05T01:11:24.141601606Z 2023-08-05 10:11:24 DEBUG Web cookie exists.
2023-08-05T01:11:24.143485479Z 2023-08-05 10:11:24 INFO Web cookie expires: 2023-10-04 @ 01:11:22
2023-08-05T01:11:24.144383867Z 2023-08-05 10:11:24 INFO Two factor authentication cookie expires: 2023-11-02 @ 04:46:07
2023-08-05T01:11:24.145227147Z 2023-08-05 10:11:24 INFO Days remaining until expiration: 88
2023-08-05T01:11:24.146083410Z 2023-08-05 10:11:24 DEBUG iCloud login counter = 4
2023-08-05T01:11:24.148526221Z 2023-08-05 10:11:24 INFO Synchronisation ended at 10:11:24
2023-08-05T01:11:24.150187099Z 2023-08-05 10:11:24 INFO Total time taken: 00:00:04
2023-08-05T01:11:24.151817701Z 2023-08-05 10:11:24 INFO Next synchronisation at 22:11:20
Try setting skip_check=true.
Tye download check has issues on some larger libraries, so disable it and see if it helps.
Thanks. Made the change, didn't work on just a restart, I reinitialized and it went through the whole photo library saying the photos already existed, and then it did exactly the same 12 hours later (which is when I set it for). skip_check
is definitely set to true, so not sure why it's not doing a full library check
When a check runs, it goes through your entire library and checks to see if there are any files missing. If there are not, the script waits until the next cycle. If there are, it kicks off a download run, where it re-scans the entire library, downloading the missing files.
Both the check and the download run will cause it to authenticate against Apple's servers, and these two log-ins in quick succession can cause Apple to trigger and MFA authentication request.
Disabling the check means it only logs in once per run, so can help because it doesn't do the double authentication.
I've never seen this behaviour where MFA is required upon every login. I'm wondering if this is a configurable option in Apple's icloud.com... to require MFA on every auth. If it is, then disabling this will solve your issue.
Well, I've had a look through the settings on my AppleID and can't see any such option, so that can't be it.
2023-08-04T01:11:22.342051068Z 0: SMS to ******xxx
2023-08-04T01:11:22.342482558Z 1: SMS to *******xxx
2023-08-04T01:11:22.342535497Z 2: Enter two-factor authentication code
2023-08-04T01:11:22.449106140Z Please choose an option: [0]: 2023-08-04 10:11:22 ERROR Failed check for new files files
Whenever you see this in the logs, you need to re-initialise the container. This happens to me a lot if I restart the container too many times. Each time you do, the container authenticates against Apple's servers. Do this a lot in quick succession and Apple sees it as suspicious behaviour and prevents login until MFA is reconfirmed.
I successfully initialized this container a few days ago, with around 34000 photos being downloaded from iCloud to my Synology NAS. Since that first download was completed however the container hasn't been able to pass auth.
Here are the logs for reference:
The
CONFIGURATION.md
suggests thatauthentication_type
should be set to 2FA (default) or Web, but it always reverts to MFA. Regardless, it's easy to see that an authentication token for MFA and 2FA exists, and that everything is readable, but for some reason it seems to be choosing option0
for auth and is failing the check for new files.Any thoughts?