boredazfcuk / docker-icloudpd

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

icloud.com.cn : Failed to download new files #553

Closed Mr-silence closed 1 month ago

Mr-silence commented 2 months ago

Overview --env TZ=CST-8 --env apple_id="**" --env download_path=/home/root/iCloud --env icloud_china=ture --env auth_china=ture --env domain=cn --env synchronisation_interval=43200 --env auto_delete=True --env folder_structure={:%Y/%m} --env authentication_type=2FA --env user=root --env user_id=0 --env group=root --env group_id=0 --env convert_heic_to_jpeg=True --env jpeg_quality=100 --env skip_check=True --volume /root/icloudpddjz_config:/config --volume /mnt/sda1/iCloud:/home/root/iCloud \

log: stdout: 2024-04-20 13:10:32 INFO iCloudPD launch command: /usr/bin/icloudpd --directory /home/root/iCloud --cookie-directory /config --folder-structure {:%Y/%m} --username *** --auto-delete 2>/tmp/icloudpd/icloudpd_download_error stdout: 2024-04-20 13:10:34 DEBUG Authenticating... stdout: iCloud Password: stdout: 2024-04-20 13:10:35 ERROR Failed to download new files stdout: 2024-04-20 13:10:35 ERROR - Can you log into iCloud.com without receiving pop-up notifications? stdout: 2024-04-20 13:10:35 ERROR Error debugging info: stdout: 2024-04-20 13:10:35 ERROR /usr/lib/python3.10/getpass.py:91: GetPassWarning: Can not control echo on the terminal. stdout: passwd = fallback_getpass(prompt, stream) stdout: Warning: Password input may be echoed. stdout: Aborted! stdout: 2024-04-20 13:10:35 ERROR * Please report problems here: https://github.com/boredazfcuk/docker-icloudpd/issues ***** stdout: 2024-04-20 13:10:35 INFO Web cookie expires: 2024-06-19 @ 04:56:15 stdout: 2024-04-20 13:10:35 INFO Two factor authentication cookie expires: 2024-07-19 @ 04:56:25 stdout: 2024-04-20 13:10:35 INFO Days remaining until expiration: 89 stdout: 2024-04-20 13:10:35 INFO iCloud login counter = 1 stdout: 2024-04-20 13:10:35 INFO Synchronisation ended at 13:10:35 stdout: 2024-04-20 13:10:35 INFO Total time taken: 00:00:03 stdout: 2024-04-20 13:10:35 INFO Next synchronisation at 01:10:32

Steps to Reproduce This is my first time starting this container, no problem getting cookies, but unable to download new files.

Expected Behavior I want it to function properly.

Context My system is openwrt. An external hard drive is used for storage. The download directory is located in the external hard drive. The format of the external hard drive is NTFS.

boredazfcuk commented 2 months ago

Downloading as the root user is not supported. The code should exit if configured that way, I'm not sure how you got this far.

TZ is wrong too.

Mr-silence commented 2 months ago

I tried changing TZ to Asia/Shanghai, keeping user_id and group_id as default, and changing Directory_permissions and file_permissions to 777, but the same error still occurred. I would like to ask if this error is a file permissions issue? Are there other problems? @boredazfcuk

boredazfcuk commented 2 months ago

What version of docker are you running?

I do believe I've seen this issue before:

stdout: Warning: Password input may be echoed.

and it was due to some older versions of NAS-based Docker installations always running the container interactively. I thought that had been resolved though.

Mr-silence commented 2 months ago

Thank you very much for your kind help. I've solved this problem. The reason for the error is that --env icloud_china=ture --env auth_china=ture is not executed normally. The code still accesses icloud.com instead of icloud.com.cn. I modified the config file and the error was resolved. @boredazfcuk

boredazfcuk commented 2 months ago

Urgh. I didn't think it would make a difference to be honest. I never used to check the value of the setting, only where it was present or not. Once upon a time you could set icloud_china=abc123 and it would work. I guess I changed that at some point. I've not given this project much focus recently so aren't as familiar with how things work anymore.

fishmanxp commented 2 months ago

I have the same error, I want to know how to modify the config file. @boredazfcuk @Mr-silence

fishmanxp commented 2 months ago

image

Mr-silence commented 2 months ago

You can find the config file of icloudpd and modify it directly with a text editor. If you have not modified the config file path parameters, the config file is in "/config" by default. Please check the mounting path in your icloudpd container. @fishmanxp

Mr-silence commented 2 months ago

In addition, according to my observation, Apple has made some restrictions on access to icloud. Too many downloads will also restrict access, resulting in the inability to download files. The same error message is reported, and it will automatically return to normal after a while.

P4SSER8Y commented 2 months ago

typo use true instead of ture

boredazfcuk commented 1 month ago

I have the same error, I want to know how to modify the config file. @boredazfcuk @Mr-silence

The nano text editor is now included in the latest container. Connect to the container's command line with something like:

docker exec -it icloudpd ash

then run:

editconfig
fishmanxp commented 1 month ago

I have modify the config file, but the error still exit.Please help me to solve this problem,It is very important for me. @boredazfcuk

boredazfcuk commented 1 month ago

Please open your own issue and post a log file with further info. I can't see what version of the container you're running, or configured options.