boredazfcuk / docker-icloudpd

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

all my containers stopped working today. Not accepting an iCloud password #443

Closed evgeniy-butakov closed 4 months ago

evgeniy-butakov commented 7 months ago

all containers stopped working today. Not accepting iCloud password

sh-4.4# docker exec -it iJenya sync-icloud.sh --Initialise

2023-12-07 17:31:18 INFO boredazfcuk/icloudpd container for icloud_photo_downloader started 2023-12-07 17:31:18 INFO https://github.com/boredazfcuk/docker-icloudpd 2023-12-07 17:31:18 INFO /usr/local/bin/sync-icloud.sh date: 2021/12/12_23:53 2023-12-07 17:31:18 INFO /usr/local/bin/sync-icloud.sh hash: 74dfafa1b3c777f518fbb55 2023-12-07 17:31:18 INFO Alpine Linux 3.13.5 2023-12-07 17:31:18 INFO Python version: 3.8.10 WARNING: You are using pip version 21.3.1; however, version 23.3.1 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command. 2023-12-07 17:31:18 INFO icloudpd version: 1.7.2 WARNING: You are using pip version 21.3.1; however, version 23.3.1 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command. 2023-12-07 17:31:20 INFO pyicloud-ipd version: 0.10.1 2023-12-07 17:31:21 INFO Running user id: 0 2023-12-07 17:31:21 INFO Running group id: 0 2023-12-07 17:31:21 INFO Local user: user:1000 2023-12-07 17:31:21 INFO Local group: group:1000 2023-12-07 17:31:21 INFO Force GID: False 2023-12-07 17:31:21 INFO LAN IP Address: 172.17.0.4 2023-12-07 17:31:21 INFO Default gateway: 172.17.0.1 2023-12-07 17:31:21 INFO DNS server: 8.8.8.8 2023-12-07 17:31:21 INFO DNS lookup for icloud.com: 17.253.144.10 2023-12-07 17:31:24 INFO Route check to icloud.com successful 2023-12-07 17:31:24 INFO Apple ID: evg**ov@***.com 2023-12-07 17:31:24 INFO Authentication Type: 2FA 2023-12-07 17:31:24 INFO Cookie path: /config/evg**com 2023-12-07 17:31:24 INFO Cookie expiry notification period: 7 2023-12-07 17:31:24 INFO Download destination directory: /home/user/iCloud 2023-12-07 17:31:24 INFO Folder structure: {:%Y} 2023-12-07 17:31:24 INFO Directory permissions: 750 2023-12-07 17:31:24 INFO File permissions: 640 2023-12-07 17:31:24 INFO Synchronisation interval: 86400 2023-12-07 17:31:24 INFO Synchronisation delay (minutes): 0 2023-12-07 17:31:24 INFO Time zone: UTC 2023-12-07 17:31:24 INFO Set EXIF date/time: False 2023-12-07 17:31:24 INFO Auto delete: False 2023-12-07 17:31:24 INFO Photo size: original 2023-12-07 17:31:24 INFO Skip download check: False 2023-12-07 17:31:24 INFO Skip live photos: False 2023-12-07 17:31:24 INFO Number of most recently added photos to download: Download All Photos 2023-12-07 17:31:24 INFO Stop downloading when prexisiting files count is: Download All Photos 2023-12-07 17:31:24 INFO Live photo size: original 2023-12-07 17:31:24 INFO Skip videos: False 2023-12-07 17:31:24 INFO Convert HEIC to JPEG: False 2023-12-07 17:31:24 INFO JPEG conversion quality: 90 2023-12-07 17:31:24 INFO Cleaned notification title: iJenya iCloud photo backup 2023-12-07 17:31:24 INFO Telegram notifications enabled 2023-12-07 17:31:24 INFO Telegram token: 117**RzI8 2023-12-07 17:31:24 INFO Telegram chat id: 10**80 2023-12-07 17:31:24 INFO Telegram notification URL: https://api.telegram.org/bot1171************8/sendMessage 2023-12-07 17:31:24 INFO Notification period: 7 2023-12-07 17:31:24 INFO Sending Telegram startup notification 2023-12-07 17:31:24 INFO Telegram startup notification sent successfully 2023-12-07 17:31:24 INFO Download notifications: Enabled 2023-12-07 17:31:24 INFO Delete notifications: Enabled 2023-12-07 17:31:24 INFO Downloading from: icloud.com 2023-12-07 17:31:25 INFO Script launch parameters: --Initialise 2023-12-07 17:31:25 INFO Group, group:1000, already created 2023-12-07 17:31:25 INFO User, user:1000, already created 2023-12-07 17:31:25 INFO Set owner, user, on iCloud directory, if required 2023-12-07 17:31:25 INFO Set group, group, on iCloud directory, if required 2023-12-07 17:31:25 INFO Correct owner on icloudpd temp directory, if required 2023-12-07 17:31:25 INFO Correct group on icloudpd temp directory, if required 2023-12-07 17:31:25 INFO Correct owner on config directory, if required 2023-12-07 17:31:25 INFO Correct group on config directory, if required 2023-12-07 17:31:25 INFO Correct owner on keyring directory, if required 2023-12-07 17:31:25 INFO Correct group on keyring directory, if required 2023-12-07 17:31:25 INFO Set 750 permissions on iCloud directories, if required 2023-12-07 17:31:25 INFO Set 640 permissions on iCloud files, if required 2023-12-07 17:31:25 INFO Configure password 2023-12-07 17:31:25 INFO Using password stored in keyring file: /config/python_keyring/keyring_pass.cfg 2023-12-07 17:31:25 INFO Correct owner on config directory, if required 2023-12-07 17:31:25 INFO Correct group on config directory, if required 2023-12-07 17:31:25 INFO Generate 2FA cookie using password stored in keyring file. Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 209, in authenticate req = self.session.post( File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 590, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 100, in request self._raise_error(code, reason) File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 122, in _raise_error raise api_error pyicloud_ipd.exceptions.PyiCloudAPIResponseError: Unknown reason

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/icloudpd", line 33, in sys.exit(load_entry_point('icloudpd==1.7.2', 'console_scripts', 'icloudpd')()) File "/usr/lib/python3.8/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/usr/lib/python3.8/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3.8/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3.8/site-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/usr/lib/python3.8/site-packages/icloudpd-1.7.2-py3.8.egg/icloudpd/base.py", line 255, in main icloud = authenticate( File "/usr/lib/python3.8/site-packages/icloudpd-1.7.2-py3.8.egg/icloudpd/authentication.py", line 29, in authenticate icloud = pyicloud_ipd.PyiCloudService( File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 193, in init self.authenticate() File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 216, in authenticate raise PyiCloudFailedLoginException(msg, error) pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseError('Unknown reason')) 2023-12-07 17:31:27 INFO Two factor authentication cookie generated. Sync should now be successful.

gunner007cd commented 7 months ago

Underlying iCloudPD is currently broken.

https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/729

dolomitt commented 7 months ago

Same for me. Changed password but still getting incorrect email/password since yesterday.

Junod972 commented 7 months ago

All my containers stopped 3 days ago. Is there any link to the fact that icloud.com now displays memories ? The underlying api(s) must have been changed one way or the other.

vw-kombi commented 7 months ago

same here.

thedinz commented 7 months ago

So, do we just need to move on, find something else?

cfurrow commented 7 months ago

So, do we just need to move on, find something else?

I don't think so. I believe the underlying issue is that iCloudPD is using outdated versions of PyiCloud, and that's causing some issues. But, until someone generously donates their time and talent to help investigate and possibly fix the issue, there will be nothing you can do but wait.

See the thread in the other repo, as mentioned above: https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/729

Junod972 commented 7 months ago

Ok. Thanks @cfurrow for all your answers here and on all the other projects. I'll try to do something I don't know how much time I will take me to do relevant contributions 😢. But, I'll try very hard. Let's fix these issues.

dotnjet commented 7 months ago

Same thing here

7MastrBlastr7 commented 7 months ago

I am experiencing a similar problem where I cannot Initialise a new docker on Unraid. During the Initialisation script, my iCloud password will not be accepted.

image

I suppose that this is a result of the same problem that was mentioned above, outdated PyiCloud version?

thedinz commented 7 months ago

yes, you're not going to be able to set this up anytime soon.

dotnjet commented 7 months ago

I am experiencing a similar problem where I cannot Initialise a new docker on Unraid. During the Initialisation script, my iCloud password will not be accepted.

image

I suppose that this is a result of the same problem that was mentioned above, outdated PyiCloud version?

Yes, it is the same here

hukilounge commented 7 months ago

Yep. Looks like a workaround has been discovered earlier today: #729

Hopefully boredazfcuk gets bored, and applies an update/fix to the Docker version (We would really appreciate it!)

If anyone here can translate that fix into an easy-to-follow method we can apply to the Docker version (on Unraid), that would also be greatly appreciated!

redindian commented 7 months ago

@hukilounge got it working with the fix:

# From Unraid command line enter the docker
docker exec -it icloudpd bin/sh

# Change to temporary directory
cd /tmp/

# Download fix
wget https://github.com/scaraebeus/icloud_photos_downloader/archive/refs/heads/auth_fix.zip

# Extract fix
unzip auth_fix.zip 

# Change to directory
cd /tmp/icloud_photos_downloader-auth_fix/src/

# Copy fix
cp -r * /opt/icloudpd_latest/lib/python3.11/site-packages/

# Run initialise again
sync-icloud.sh --Initialise

# Clean up
rm -rf /tmp/icloud_photos_downloader-auth_fix/
rm /tmp/auth_fix.zip
FootKaput commented 7 months ago

@hukilounge got it working with the fix:

# From Unraid command line enter the docker
docker exec -it icloudpd bin/sh

# Change to temporary directory
cd /tmp/

# Download fix
wget https://github.com/scaraebeus/icloud_photos_downloader/archive/refs/heads/auth_fix.zip

# Extract fix
unzip auth_fix.zip 

# Change to directory
cd /tmp/icloud_photos_downloader-auth_fix/src/

# Copy fix
cp -r * /opt/icloudpd_latest/lib/python3.11/site-packages/

# Run initialise again
sync-icloud.sh --Initialise

# Clean up
rm -rf /tmp/icloud_photos_downloader-auth_fix/
rm /tmp/auth_fix.zip

I did the above and my unraid icloudPD is working again. Thank you!

w1zz4 commented 7 months ago

@redindian

The problem with you solution is that it will be brake again if you restart the container.

The best way to do it would be to clone repo, edit icloudpd.dockerfile

echo "$(date '+%d/%m/%Y - %H:%M:%S') | Clean up" && \ apk del --no-progress --purge build-deps && \ echo "$(date '+%d/%m/%Y - %H:%M:%S') | Fix Auth" && \ wget https://github.com/scaraebeus/icloud_photos_downloader/archive/refs/heads/auth_fix.zip && \ unzip auth_fix.zip && \ cp -r ./icloud_photos_downloader-auth_fix/src/* /opt/icloudpd_latest/lib/python3.11/site-packages/ && \ rm -rf ./auth_fix.zip && \ rm -rf ./icloud_photos_downloader-auth_fix

Build that image then restart container with the newly created image. Now the changes will be persistent

I submitted pull request #448 as a temporary fix

FootKaput commented 7 months ago

I saw that icloudPD for unraid updated 13 hours ago by boredazfcuk

https://hub.docker.com/r/boredazfcuk/icloudpd/tags

Installed update via unraid, and connected to icloud without issue.

Sohardh commented 7 months ago

icloudPD for unraid updated 13 hours ago.

https://hub.docker.com/r/boredazfcuk/icloudpd/tags

Installed update via unraid, and connected to icloud without issue.

I love open source! Keep doing the good work guys <3

redindian commented 7 months ago

The problem with you solution is that it will be brake again if you restart the container.

It does survive a container restart here, but you're right. This is only a temporary fix and building a new image is better. 👍 But now there is already an update so we're all good again. 🥳

boredazfcuk commented 6 months ago

Latest version should work for icloud.com users and hopefully icloud.com.cn users too, but this is untested.

kfstorm commented 6 months ago

Tested by an icloud.com.cn user, it works now.

dangoursfox commented 5 months ago

Tested by an icloud.com.cn user, it works now.

2024/1/24,still bad password, using a docker version in Container Manager on Synology DSM7.2.1. icloud.com.cn user