boredazfcuk / docker-icloudpd

An Alpine Linux container for the iCloud Photos Downloader command line utility
1.58k stars 149 forks source link

Can't initialize w/ MFA #521

Closed pltaylor closed 3 months ago

pltaylor commented 3 months ago

I try to run the initialization routine and get these logs....

/ # /usr/local/bin/sync-icloud.sh --Initialise

2024-03-13 09:50:15 INFO boredazfcuk/icloudpd container for icloud_photo_downloader v1.0.718 started 2024-03-13 09:50:15 INFO For support, please go here: https://github.com/boredazfcuk/docker-icloudpd 2024-03-13 09:50:15 INFO Alpine Linux 3.19.0 2024-03-13 09:50:15 INFO Python version: 3.11.6 2024-03-13 09:50:15 INFO Loading configuration from: /config/icloudpd.conf 2024-03-13 09:50:15 DEBUG Running user id: 0 2024-03-13 09:50:15 DEBUG Running group id: 0 2024-03-13 09:50:15 DEBUG Local user: user:1000 2024-03-13 09:50:15 DEBUG Local group: group:1000 2024-03-13 09:50:15 DEBUG Force GID: false 2024-03-13 09:50:15 DEBUG LAN IP Address: 172.17.0.14 2024-03-13 09:50:15 DEBUG Default gateway: 172.17.0.1 2024-03-13 09:50:15 DEBUG DNS server: 8.8.8.8 8.8.4.4 2024-03-13 09:50:15 DEBUG IP address for icloud.com: 17.253.144.10 2024-03-13 09:50:18 DEBUG Route check to icloud.com successful 2024-03-13 09:50:18 DEBUG Apple ID: (hidden) 2024-03-13 09:50:18 INFO Authentication Type: MFA 2024-03-13 09:50:18 DEBUG Cookie path: /config/(hidden) 2024-03-13 09:50:18 INFO Cookie expiry notification period: 7 2024-03-13 09:50:18 INFO Download destination directory: /home/user/iCloud 2024-03-13 09:50:18 INFO Folder structure: {:%Y/%m/%d} 2024-03-13 09:50:18 DEBUG Directory permissions: 777 2024-03-13 09:50:18 DEBUG File permissions: 666 2024-03-13 09:50:18 INFO Synchronisation interval: 86400 2024-03-13 09:50:18 INFO Synchronisation delay (minutes): 0 2024-03-13 09:50:18 INFO Set EXIF date/time: false 2024-03-13 09:50:18 INFO Auto delete: false 2024-03-13 09:50:18 INFO Delete after download: false 2024-03-13 09:50:18 INFO Photo size: original 2024-03-13 09:50:18 INFO Single pass mode: false 2024-03-13 09:50:18 INFO Skip download check: false 2024-03-13 09:50:18 INFO Skip live photos: false 2024-03-13 09:50:18 INFO Number of most recently added photos to download: Download All Photos 2024-03-13 09:50:18 INFO Downloading photos from: Download All Photos 2024-03-13 09:50:18 INFO Stop downloading when prexisiting files count is: Download All Photos 2024-03-13 09:50:18 INFO Live photo size: original 2024-03-13 09:50:18 INFO Skip videos: false 2024-03-13 09:50:18 INFO Convert HEIC to JPEG: false 2024-03-13 09:50:18 INFO Downloading from: icloud.com 2024-03-13 09:50:18 INFO Authentication domain: com 2024-03-13 09:50:18 DEBUG Nextcloud synchronisation trigger: Disabled 2024-03-13 09:50:18 DEBUG Nextcloud upload: Disabled 2024-03-13 09:50:18 INFO Ignore Synology extended attribute directories: Disabled 2024-03-13 09:50:20 DEBUG Activated Python virtual environment for icloudpd: 1.17.3 2024-03-13 09:50:20 INFO Script launch parameters: --Initialise 2024-03-13 09:50:20 DEBUG Group, group:1000, already created 2024-03-13 09:50:20 DEBUG User, user:1000, already created 2024-03-13 09:50:20 DEBUG Set owner and group on icloudpd temp directory 2024-03-13 09:50:20 DEBUG Set owner and group on config directory 2024-03-13 09:50:20 INFO Directory is writable: /config/python_keyring/ 2024-03-13 09:50:20 DEBUG Configure password 2024-03-13 09:50:20 DEBUG Using password stored in keyring file: /config/python_keyring/keyring_pass.cfg 2024-03-13 09:50:20 INFO Starting container initialisation 2024-03-13 09:50:20 DEBUG 2024-03-13 09:50:20 INFO Correct owner on config directory, if required 2024-03-13 09:50:20 DEBUG 2024-03-13 09:50:20 INFO Correct group on config directory, if required 2024-03-13 09:50:20 DEBUG Generate MFA cookie using password stored in keyring file 2024-03-13 09:50:23 ERROR Authentication required for Account. (421) 2024-03-13 09:50:24 ERROR Invalid username/password combination. (401) Traceback (most recent call last): File "pyicloud_ipd/base.py", line 357, in authenticate File "requests/sessions.py", line 637, in post File "pyicloud_ipd/base.py", line 140, in request File "pyicloud_ipd/base.py", line 207, in _raise_error pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Invalid username/password combination. (401)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "starters/icloudpd.py", line 6, in File "click/core.py", line 1157, in call File "click/core.py", line 1078, in main File "click/core.py", line 1434, in invoke File "click/core.py", line 783, in invoke File "icloudpd/base.py", line 328, in main File "icloudpd/base.py", line 760, in core File "icloudpd/authentication.py", line 31, in authenticate_ File "pyicloud_ipd/base.py", line 305, in init File "pyicloud_ipd/base.py", line 365, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Invalid username/password combination. (401)')) [809] Failed to execute script 'icloudpd' due to unhandled exception! 2024-03-13 09:50:24 ERROR Multifactor authentication information missing from cookie. Authentication has failed 2024-03-13 09:50:24 ERROR - Was the correct password entered? 2024-03-13 09:50:24 ERROR - Was the multifactor authentication code mistyped? 2024-03-13 09:50:24 ERROR - Can you log into icloud.com without receiving pop-up notifications? 2024-03-13 09:50:24 INFO Container initialisation complete

I'm not sure what I am doing wrong. I have it working for another account in a different container, so I'm a bit confused.

pltaylor commented 3 months ago

I deleted the stored python key and re-did the pass. All was well from there.