boredazfcuk / docker-icloudpd

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

不知道该怎么写问题,似乎是用户421报错 #658

Open lz732895965 opened 4 weeks ago

lz732895965 commented 4 weeks ago

我是中国大陆的Apple ID,配置文件也按照教程来做到,但是在运行过程中报了很多错误,不知道怎么办。 日志如下:

2024-09-28 10:55:56 INFO     ***** boredazfcuk/icloudpd container v1.0.980_17-09-2024 started *****
-

2024-09-28 10:55:56 INFO     ***** For support, please go here: https://github.com/boredazfcuk/docker-icloudpd *****

2024-09-28 10:55:56 INFO     Alpine Linux 3.20.3

2024-09-28 10:55:56 INFO     Python version: 3.12.6

2024-09-28 10:55:58 INFO     icloud-photos-downloader version: 1.23.4

2024-09-28 10:55:58 INFO     Checking for updates...

2024-09-28 10:55:59 INFO      - Current version is up to date

2024-09-28 10:55:59 INFO     Loading configuration from: /config/icloudpd.conf

2024-09-28 10:56:22 INFO     Apple ID: one21cn@163.com

2024-09-28 10:56:22 INFO     Authentication Type: MFA

2024-09-28 10:56:22 INFO     Cookie path: /config/one21cn163com

2024-09-28 10:56:22 INFO     Cookie expiry notification period: 7

2024-09-28 10:56:22 INFO     Download destination directory: /iCloud

2024-09-28 10:56:22 INFO     Folder structure: {:%Y/%m/%d}

2024-09-28 10:56:23 INFO     Keep Unicode: false

2024-09-28 10:56:23 INFO     Live Photo MOV Filename Policy: suffix

2024-09-28 10:56:23 INFO     File Match Policy: name-size-dedup-with-suffix

2024-09-28 10:56:23 INFO     Synchronisation interval: 86400

2024-09-28 10:56:23 INFO     Synchronisation delay (minutes): 0

2024-09-28 10:56:23 INFO     Set EXIF date/time: false

2024-09-28 10:56:23 INFO     Auto delete: false

2024-09-28 10:56:23 INFO     Delete after download: false

2024-09-28 10:56:23 INFO     Delete empty directories: false

2024-09-28 10:56:23 INFO     Photo size: original

2024-09-28 10:56:23 INFO     Align RAW: as-is

2024-09-28 10:56:23 INFO     Single pass mode: false

2024-09-28 10:56:23 INFO     Skip download check: false

2024-09-28 10:56:23 INFO     Skip live photos: false

2024-09-28 10:56:23 INFO     Number of most recently added photos to download: Download All Photos

2024-09-28 10:56:23 INFO     Downloading photos from: Download All Photos

2024-09-28 10:56:23 INFO     Stop downloading when prexisiting files count is: Download All Photos

2024-09-28 10:56:23 INFO     Live photo size: original

2024-09-28 10:56:23 INFO     Skip videos: false

2024-09-28 10:56:23 INFO     Convert HEIC to JPEG: false

2024-09-28 10:56:23 INFO     Downloading from: icloud.com.cn

2024-09-28 10:56:23 INFO     Fake user agent for curl: Disabled

2024-09-28 10:56:23 INFO     Authentication domain: cn

2024-09-28 10:56:23 INFO     Ignore Synology extended attribute directories: Disabled

2024-09-28 10:56:23 INFO     Container initialisation complete

2024-09-28 10:56:23 INFO     Directory is writable: /config/python_keyring/

2024-09-28 10:56:23 INFO     Check download directory mounted correctly...

2024-09-28 10:56:23 INFO     Failsafe file /iCloud/.mounted exists, continuing

2024-09-28 10:56:23 INFO     Directory is writable: /config/python_keyring/

2024-09-28 10:56:23 INFO     Keyring file exists, continuing

2024-09-28 10:56:23 INFO     Sync user: user

2024-09-28 10:56:23 INFO     Synchronisation starting at 10:56:23

2024-09-28 10:56:23 INFO     Keyring file exists, continuing

2024-09-28 10:58:18 INFO     Check download directory mounted correctly...

2024-09-28 10:58:18 INFO     Failsafe file /iCloud/.mounted exists, continuing

2024-09-28 10:58:18 INFO     Check for new files using password stored in keyring file

2024-09-28 10:58:18 INFO     Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please e patient. Nothing is being downloaded at this time

2024-09-28 10:58:21 ERROR    Authentication required for Account. (421)

2024-09-28 10:58:29 ERROR    Please log into https://icloud.com/ to manually finish setting up your iCloud service (AUTHENTICATION_FAILED)

2024-09-28 10:58:30 ERROR    Failed check for new files files

2024-09-28 10:58:30 ERROR     - Can you log into icloud.com.cn without receiving pop-up notifications?

2024-09-28 10:58:30 ERROR    Error debugging info:

2024-09-28 10:58:30 ERROR    Traceback (most recent call last):

  File "starters/icloudpd.py", line 6, in <module>

  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 745, in main

  File "icloudpd/base.py", line 1218, in core

  File "pyicloud_ipd/base.py", line 549, in photos

  File "pyicloud_ipd/services/photos.py", line 281, in __init__

  File "pyicloud_ipd/services/photos.py", line 168, in __init__

  File "requests/sessions.py", line 637, in post

  File "pyicloud_ipd/session.py", line 167, in request

  File "pyicloud_ipd/session.py", line 185, in _raise_error

pyicloud_ipd.exceptions.PyiCloudServiceNotActivatedException: Please log into https://icloud.com/ to manually finish setting up your iCloud service (UTHENTICATION_FAILED)

[671] Failed to execute script 'icloudpd' due to unhandled exception!

2024-09-28 10:58:30 ERROR    Please set debug_logging=true in your icloudpd.conf file then reproduce the error

2024-09-28 10:58:30 ERROR    ***** Once you have captured this log file, please post it along with a description of your problem, here: https//github.com/boredazfcuk/docker-icloudpd/issues *****

ash: out of range

2024-09-28 10:58:30 INFO     Web cookie expires: 2024-11-27 @ 02:57:43

2024-09-28 10:58:30 INFO     Multifactor authentication cookie expires: 2024-10-28 @ 02:58:14

2024-09-28 10:58:30 INFO     Days remaining until expiration: 29

2024-09-28 10:58:30 INFO     Synchronisation ended at 10:58:30

2024-09-28 10:58:30 INFO     Total time taken: 00:02:07

2024-09-28 10:58:30 INFO     Next synchronisation at Sun Sep 29 10:56:23 2024

2024-09-28 10:58:49 INFO     ***** boredazfcuk/icloudpd container v1.0.980_17-09-2024 started *****

2024-09-28 10:58:49 INFO     ***** For support, please go here: https://github.com/boredazfcuk/docker-icloudpd *****

2024-09-28 10:58:49 INFO     Alpine Linux 3.20.3

2024-09-28 10:58:49 INFO     Python version: 3.12.6

2024-09-28 10:58:52 INFO     icloud-photos-downloader version: 1.23.4

2024-09-28 10:58:52 INFO     Checking for updates...

2024-09-28 10:58:53 INFO      - Current version is up to date

2024-09-28 10:58:53 INFO     Loading configuration from: /config/icloudpd.conf

2024-09-28 10:59:17 INFO     Apple ID: one21cn@163.com

2024-09-28 10:59:17 INFO     Authentication Type: MFA

2024-09-28 10:59:17 INFO     Cookie path: /config/one21cn163com

2024-09-28 10:59:17 INFO     Cookie expiry notification period: 7

2024-09-28 10:59:17 INFO     Download destination directory: /iCloud

2024-09-28 10:59:17 INFO     Folder structure: {:%Y/%m/%d}

2024-09-28 10:59:17 INFO     Keep Unicode: false

2024-09-28 10:59:17 INFO     Live Photo MOV Filename Policy: suffix

2024-09-28 10:59:17 INFO     File Match Policy: name-size-dedup-with-suffix

2024-09-28 10:59:17 INFO     Synchronisation interval: 86400

2024-09-28 10:59:17 INFO     Synchronisation delay (minutes): 0

2024-09-28 10:59:17 INFO     Set EXIF date/time: false

2024-09-28 10:59:17 INFO     Auto delete: false

2024-09-28 10:59:17 INFO     Delete after download: false

2024-09-28 10:59:17 INFO     Delete empty directories: false

2024-09-28 10:59:17 INFO     Photo size: original

2024-09-28 10:59:17 INFO     Align RAW: as-is

2024-09-28 10:59:17 INFO     Single pass mode: false

2024-09-28 10:59:17 INFO     Skip download check: false

2024-09-28 10:59:17 INFO     Skip live photos: false

2024-09-28 10:59:17 INFO     Number of most recently added photos to download: Download All Photos

2024-09-28 10:59:17 INFO     Downloading photos from: Download All Photos

2024-09-28 10:59:17 INFO     Stop downloading when prexisiting files count is: Download All Photos

2024-09-28 10:59:17 INFO     Live photo size: original

2024-09-28 10:59:17 INFO     Skip videos: false

2024-09-28 10:59:17 INFO     Convert HEIC to JPEG: false

2024-09-28 10:59:17 INFO     Downloading from: icloud.com.cn

2024-09-28 10:59:17 INFO     Fake user agent for curl: Disabled

2024-09-28 10:59:17 INFO     Authentication domain: cn

2024-09-28 10:59:17 INFO     Ignore Synology extended attribute directories: Disabled

2024-09-28 10:59:17 INFO     Container initialisation complete

2024-09-28 10:59:17 INFO     Directory is writable: /config/python_keyring/

2024-09-28 10:59:17 INFO     Check download directory mounted correctly...

2024-09-28 10:59:17 INFO     Failsafe file /iCloud/.mounted exists, continuing

2024-09-28 10:59:17 INFO     Directory is writable: /config/python_keyring/

2024-09-28 10:59:17 INFO     Keyring file exists, continuing

2024-09-28 10:59:17 INFO     Sync user: user

2024-09-28 10:59:17 INFO     Synchronisation starting at 10:59:17

2024-09-28 10:59:17 INFO     Keyring file exists, continuing

2024-09-28 10:59:17 INFO     Check download directory mounted correctly...

2024-09-28 10:59:17 INFO     Failsafe file /iCloud/.mounted exists, continuing

2024-09-28 10:59:17 INFO     Check for new files using password stored in keyring file

2024-09-28 10:59:17 INFO     Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please e patient. Nothing is being downloaded at this time

2024-09-28 10:59:20 ERROR    Authentication required for Account. (421)

2024-09-28 10:59:28 ERROR    Please log into https://icloud.com/ to manually finish setting up your iCloud service (AUTHENTICATION_FAILED)

2024-09-28 10:59:29 ERROR    Failed check for new files files

2024-09-28 10:59:29 ERROR     - Can you log into icloud.com.cn without receiving pop-up notifications?

2024-09-28 10:59:29 ERROR    Error debugging info:

2024-09-28 10:59:29 ERROR    Traceback (most recent call last):

  File "starters/icloudpd.py", line 6, in <module>

  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 745, in main

  File "icloudpd/base.py", line 1218, in core

  File "pyicloud_ipd/base.py", line 549, in photos

  File "pyicloud_ipd/services/photos.py", line 281, in __init__

  File "pyicloud_ipd/services/photos.py", line 168, in __init__

  File "requests/sessions.py", line 637, in post

  File "pyicloud_ipd/session.py", line 167, in request

  File "pyicloud_ipd/session.py", line 185, in _raise_error

pyicloud_ipd.exceptions.PyiCloudServiceNotActivatedException: Please log into https://icloud.com/ to manually finish setting up your iCloud service (UTHENTICATION_FAILED)

[417] Failed to execute script 'icloudpd' due to unhandled exception!

2024-09-28 10:59:29 ERROR    Please set debug_logging=true in your icloudpd.conf file then reproduce the error

2024-09-28 10:59:29 ERROR    ***** Once you have captured this log file, please post it along with a description of your problem, here: https//github.com/boredazfcuk/docker-icloudpd/issues *****

ash: out of range

2024-09-28 10:59:29 INFO     Web cookie expires: 2024-11-27 @ 02:57:43

2024-09-28 10:59:29 INFO     Multifactor authentication cookie expires: 2024-10-28 @ 02:58:29

2024-09-28 10:59:29 INFO     Days remaining until expiration: 29

2024-09-28 10:59:29 INFO     Synchronisation ended at 10:59:29

2024-09-28 10:59:29 INFO     Total time taken: 00:00:12

2024-09-28 10:59:29 INFO     Next synchronisation at Sun Sep 29 10:59:17 2024

配置文件如下:

agentid=
albums_with_dates=false
align_raw=as-is
apple_id=one21cn@163.com
auth_china=true
authentication_type=MFA
auto_delete=false
bark_device_key=
bark_server=
content_source_url=
convert_heic_to_jpeg=false
debug_logging=false
delete_accompanying=false
delete_after_download=false
delete_empty_directories=false
delete_notifications=true
dingtalk_token=
directory_permissions=750
discord_id=
discord_token=
download_notifications=true
download_path=/iCloud
fake_user_agent=false
file_match_policy=name-size-dedup-with-suffix
file_permissions=640
folder_structure={:%Y/%m/%d}
force_gid=false
gotify_app_token=
gotify_https=
gotify_server_url=
group=group
group_id=1000
icloud_china=true
iyuu_token=
jpeg_path=
jpeg_quality=90
keep_unicode=false
libraries_with_dates=false
live_photo_mov_filename_policy=suffix
live_photo_size=original
media_id_delete=
media_id_download=
media_id_expiration=
media_id_startup=
media_id_warning=
msmtp_args=--tls-starttls=off
msmtp_from=
msmtp_host=
msmtp_pass=
msmtp_port=
msmtp_tls=on
msmtp_to=
msmtp_user=
name=
nextcloud_delete=false
nextcloud_password=
nextcloud_upload=false
nextcloud_url=
nextcloud_username=
notification_days=7
notification_type=
photo_album=
photo_library=
photo_size=original
prowl_api_key=
pushover_sound=
pushover_token=
pushover_user=
recent_only=
set_exif_datetime=false
single_pass=false
skip_album=
skip_check=false
skip_download=false
skip_library=
skip_live_photos=false
skip_videos=false
startup_notification=true
synchronisation_delay=0
synchronisation_interval=86400
synology_ignore_path=false
telegram_chat_id=
telegram_http=false
telegram_polling=true
telegram_server=
telegram_silent_file_notifications=
telegram_token=
touser=
trigger_nextlcoudcli_synchronisation=
until_found=
user=user
user_id=1000
webhook_https=false
webhook_id=
webhook_path=/api/webhook/
webhook_port=8123
webhook_server=
wecom_id=
wecom_proxy=
wecom_secret=

请大佬出谋划策呀

simonxiao86 commented 2 weeks ago

Please check the cookie file exist(file with name emailaddresscom,if your appleid is 123@aa.com,it's 123aacom). If do not have cookie,modify the config folder permission. 检查一下 config 文件夹下有沒有 cookie 文件(appleid 是 123@aa.com 的话,文件名为 123aacom).如果没有的话,需要将文件夹权限改为可以写入,简单点就直接整个文件夹改 777

lz732895965 commented 2 weeks ago

Please check the cookie file exist(file with name emailaddresscom,if your appleid is 123@aa.com,it's 123aacom). If do not have cookie,modify the config folder permission. 检查一下 config 文件夹下有沒有 cookie 文件(appleid 是 123@aa.com 的话,文件名为 123aacom).如果没有的话,需要将文件夹权限改为可以写入,简单点就直接整个文件夹改 777

我按照了你的说法检查了相应的文件夹,确认没有任何问题,但我仍然收到上述的日志报告

simonxiao86 commented 2 weeks ago

你是第一次运行吗,需要 docker exec -it iCloudPD sync-icloud.sh --Initialise 进行账户初始化,这里 iCloudPD 是容器的 name. 参见官网配置文件说明,MULTIFACTOR AUTHENTICATION, 中国区可参考 Some User Experience Tips//一些使用体验 · Issue #336 · boredazfcuk/docker-icloudpd:icloudpd.conf文件的两个值——auth_china=true;icloud_china=true,时区 TZ=Asia/Shanghai 以及 OpenWrt下使用docker安装icloudpd实现iPhone照片备份私有云盘nas的笔记_docker icloudpd-CSDN博客

github 上最好还是用英语来提 issue

lz732895965 commented 2 weeks ago

你是第一次运行吗,需要 docker exec -it iCloudPD sync-icloud.sh --Initialise 进行账户初始化,这里 iCloudPD 是容器的 name. 参见官网配置文件说明,MULTIFACTOR AUTHENTICATION, 中国区可参考 Some User Experience Tips//一些使用体验 · Issue #336 · boredazfcuk/docker-icloudpd:icloudpd.conf文件的两个值——auth_china=true;icloud_china=true,时区 TZ=Asia/Shanghai 以及 OpenWrt下使用docker安装icloudpd实现iPhone照片备份私有云盘nas的笔记_docker icloudpd-CSDN博客

github 上最好还是用英语来提 issue

谢谢大佬,问题已经解决。抱歉大佬,我英语实在太差了,搞不了。不过好在问题解决了。谢谢你的回复。

Ynona commented 1 week ago

怎么解决的呀,icloudpd.conf文件的两个值——auth_china=true;icloud_china=true,时区 TZ=Asia/Shanghai 这些都有设置,也初始化了。同样错误

lz732895965 commented 1 week ago

怎么解决的呀,icloudpd.conf文件的两个值——auth_china=true;icloud_china=true,时区 TZ=Asia/Shanghai 这些都有设置,也初始化了。同样错误

说实话我也不知道怎么解决的,我没有改动任何东西。只是在停用了一段时间之后又重开了一下,刚重开那段时间问题依旧,就没管他了,再然后就莫名其妙的自动好了。

Ynona commented 1 week ago

我晕死 真的是吃英语不好的亏,你和我的报错里面都写了的:Please log into https://icloud.com/ to manually finish setting up your iCloud service (AUTHENTICATION_FAILED) 我登录进去后 完成服务条款的同意就能够开始同步照片了,无语死,弄了半天。