Open blademainer opened 2 years ago
same error
Same happened to me and need help.
same error, it seems wrong url "accountservice.p00.prod.me.com"
Two-step/two-factor authentication is required!
Traceback (most recent call last):
File "/usr/bin/icloudpd", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.10/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.10/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.10/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/icloudpd/base.py", line 255, in main
icloud = authenticate(
File "/usr/lib/python3.10/site-packages/icloudpd/authentication.py", line 47, in authenticate
request_2sa(icloud, logger)
File "/usr/lib/python3.10/site-packages/icloudpd/authentication.py", line 53, in request_2sa
devices = icloud.trusted_devices
File "/usr/lib/python3.10/site-packages/pyicloud_ipd/base.py", line 249, in trusted_devices
request = self.session.get(
File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/lib/python3.10/site-packages/pyicloud_ipd/base.py", line 100, in request
self._raise_error(code, reason)
File "/usr/lib/python3.10/site-packages/pyicloud_ipd/base.py", line 122, in _raise_error
raise api_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseError: statusCode = UnknownServerError, IOException sending request https://accountservice.p00.prod.me.com:443/api/get_challenge_devices, Failed to resolve 'accountservice.p00.prod.me.com' after 6 queries
anyone know how to fix this bug? o(╥﹏╥)o
same error,and i can't resolve the url “accountservice.p00.prod.me.com”
This is not a bug. Maybe Apple already shutdown those APIs.
same error
same error
有谁还在研究这个bug吗,我的验证到期几天了,一直没办法再次验证成功
Same error. It may be because Apple updated iCloud on the web.
same error Is there a possibility? This is also because of the region. I think the service didn't wok properly for the requests from the china mainland.
I have located the problem on the below and tried to request the API by the raw way .
After that I got the messege from that API on below:
{ "success": false, "error": "Missing X-APPLE-WEBAUTH-HSA-LOGIN cookie" }
But I really don't know where can i get the cookie X-APPLE-WEBAUTH-HSA-LOGIN.
Can anybody help me fix this or tell me where can i find it ?
I had fixed this problem by the pyicloud . In another word, I had rewritten the icloudPD by using the new version of pyicloud. At the same time , I had implemented the two step authentication for the user for china mainland.
I had fixed this problem by the pyicloud . In another word, I had rewritten the icloudPD by using the new version of pyicloud. At the same time , I had implemented the two step authentication for the user for china mainland.
提个PR给仓库管理者? 我看你直接开了个新的仓库?
I had tried to rewrite the icloudpd by using the new version of pyicloud.But I got an error:
2022-12-06 02:16:51 INFO Generate 2FA cookie using password stored in keyring file
Traceback (most recent call last):
File "/usr/bin/icloudpd", line 33, in <module>
sys.exit(load_entry_point('icloudpd==1.7.2', 'console_scripts', 'icloudpd')())
File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/icloudpd-1.7.2-py3.10.egg/icloudpd/base.py", line 271, in main
icloud = authenticate(
File "/usr/lib/python3.10/site-packages/icloudpd-1.7.2-py3.10.egg/icloudpd/authentication.py", line 29, in authenticate
icloud = pyicloud_ipd.PyiCloudService(
File "/usr/lib/python3.10/site-packages/pyicloud/base.py", line 271, in __init__
self.authenticate()
File "/usr/lib/python3.10/site-packages/pyicloud/base.py", line 338, in authenticate
self._webservices = self.data["webservices"]
KeyError: 'webservices'
2022-12-06 02:16:55 ERROR 2FA information missing from cookie. Authentication has failed
2022-12-06 02:16:55 ERROR - Was the correct password entered?
2022-12-06 02:16:55 ERROR - Was the 2FA code mistyped?
2022-12-06 02:16:55 ERROR - Can you log into iCloud.com without receiving pop-up notifications?
And the value of self.data
is {'domainToUse': 'iCloud.com.cn'}
Can anybody help me fix this?
Modified to use picklepete's pyicloud 1.0.0. 2FA expiration not handled. Use at your own risk.
Modified to use picklepete's pyicloud 1.0.0. 2FA expiration not handled. Use at your own risk.
I had tried to replace the icloudpd
file from your code in docker, but i got the same error
I meet the same issue, 2 ways for the issue
Modified to use picklepete's pyicloud 1.0.0. 2FA expiration not handled. Use at your own risk. Code goes here
I had tried to replace the
pyicloud
file from your code in docker, but i got the same error
ok i have solved this problem., just replace icloud.com
by icloud.com.cn
in file /pyicloud/base.py
(pyicloud1.0.0).
or use this shell below in Linux
sed -i \
-e "s#icloud.com/#icloud.com.cn/#" \
-e "s#icloud.com\"#icloud.com.cn\"#" \
"$(pip show pyicloud | grep "Location" | awk '{print $2}')/pyicloud/base.py"
And my downloader can work.
It works now, thanks a lot, man! Just one further question, what do you mean not handle the 2FA expiration? what will happen after 2FA expired? @mbax2zf2
我来分享一下我怎么做的:
如何在安装了原版的基础上更新成修改版:
用github上修改版目录/icloudpd下的三个文件,替代原版目录:/usr/local/lib/python3.8/dist-packages/icloudpd 下的三个同名文件:
安装pyicloud
安装完以后,修改文件:/usr/local/lib/python3.8/dist-packages/pyicloud/base.py,把文件中的icloud.com都替换成icloud.com.cn
结束了,应该可以恢复备份了
按你的步骤还是无法成功, 直接安装pyicloud和修改版就可以了, 不需要安装原版了:
- 如果安装了原版则先卸载: pip uninstall icloudpd
- pip install pyicloud
- sed -i \ -e "s#icloud.com/#icloud.com.cn/#" \ -e "s#icloud.com\"#icloud.com.cn\"#" \ "$(pip show pyicloud | grep "Location" | awk '{print $2}')/pyicloud/base.py"
- git clone https://github.com/mbax2zf2/icloud_photos_downloader.git
- cd icloud_photos_downloader && python setup.py build && python setup.py install
- 结束了,应该可以正常登录了
I am using the docker:pjoc/docker-icloudpd:master to fix the 2FA issue in China, so far I can create the key-ring, but after that I met below issue. Can you help me?
2023-01-14 18:06:42 INFO Check for new files using password stored in keyring file 2023-01-14 18:06:42 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 b eing downloaded at this time 2023-01-14 18:06:49 ERROR Failed check for new files files 2023-01-14 18:06:49 ERROR - Can you log into iCloud.com without receiving po p-up notifications? 2023-01-14 18:06:49 ERROR Error debugging info: 2023-01-14 18:06:49 ERROR 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.10/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(args, kwargs) File "/usr/lib/python3.10/site-packages/icloudpd-1.7.2-py3.10.egg/icloudpd/bas e.py", line 563, in main download_photo(consecutive_files_found, item) File "/usr/lib/python3.10/site-packages/icloudpd-1.7.2-py3.10.egg/icloudpd/bas e.py", line 392, in download_photo date_path = folder_structure.format(created_date) KeyError: ' ' 2023-01-14 18:06:49 ERROR ** Please report problems here: https://github.c/ om/boredazfcuk/docker-icloudpd/issues
Failed check for new files files #261
我win11环境可以了,总结一下就是用picklepete/pyicloud和mbax2zf2/icloud_photos_downloader,然后pyicloud里的base.py要替换.cn 就可以正常下载图片视频,可以完成双重认证。不知主分支何时更改
Is the domain change the minimum required change or something else need to be changed too? #573
Hi Andrey. Thanks for all your work on this recently. I can see a great deal of effort has gone into it over the past few weeks.
Someone submitted a PR to my container to 'fix' this issue, PR is here: https://github.com/boredazfcuk/docker-icloudpd/pull/265/commits/d0ffe24212cea558a3b9eead8f2d413c62b170f3
It is using a custom pyicloud so I believe there is more to it than just changing the domain. Some users claim that it no longer downloads Live Photos after that change though.
You might want to take a look at it anyway.
Please try icloudpd docker >=1.9.0 and --domain cn
parameter to solve the issue. If auth and/.or downloading still does not work, reopen the issue.
# icloudpd --version
icloudpd, version 1.9.0
#
#
# icloudpd --directory /path/to/data \
--cookie-directory /path/to/cookies \
--folder-structure {:%Y/%Y-%m-%d} \
--username example@example.com \
--domain cn
2023-02-13 00:00:34 DEBUG Authenticating...
2023-02-13 00:00:39 INFO Two-step/two-factor authentication is required!
Traceback (most recent call last):
File "/bin/icloudpd", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/icloudpd/base.py", line 275, in main
icloud = authenticator(domain)(
File "/usr/lib/python3.8/site-packages/icloudpd/authentication.py", line 48, in authenticate_
request_2sa(icloud, logger)
File "/usr/lib/python3.8/site-packages/icloudpd/authentication.py", line 55, in request_2sa
devices = icloud.trusted_devices
File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 266, in trusted_devices
request = self.session.get(
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 105, in request
self._raise_error(code, reason)
File "/usr/lib/python3.8/site-packages/pyicloud_ipd/base.py", line 127, in _raise_error
raise api_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseError: statusCode = UnknownServerError, IOException sending request https://accountservice.p00.prod.me.com:443/api/get_challenge_devices, accountservice.p00.prod.me.com
version 1.9.0,Error still exists
Two-step authentication required. Your trusted devices are:
Traceback (most recent call last):
File "/usr/local/bin/icloud", line 8, in
Looks like using .cn domain is not enough for iCloudPD to work from China. Reopening
Same issue
same issue cn account
same issue
感觉这个bug不好解啊,好像挂了很久了~😅
Folks, Can somebody try binary icloudpd
pointing to a new cookie folder and using --domain cn
parameter, please? My theory is that "accountservice.p00.prod.me.com" url is saved in the session state from calls to icloud.com prior to using "cn" domain. If new cookie folder is used with --domain cn
parameter, then initial authentication will save session data together with url to service that is available in China. TIA
Folks, Can somebody try binary
icloudpd
pointing to a new cookie folder and using--domain cn
parameter, please? My theory is that "accountservice.p00.prod.me.com" url is saved in the session state from calls to icloud.com prior to using "cn" domain. If new cookie folder is used with--domain cn
parameter, then initial authentication will save session data together with url to service that is available in China. TIA
I tried the latest docker image pointing to an empty cookie folder and using '--doman cn'. But same error.
pyicloud_ipd.exceptions.PyiCloudAPIResponseError: statusCode = UnknownServerError, IOException sending request https://accountservice.p00.prod.me.com:443/api/get_challenge_devices, accountservice.p00.prod.me.com
Maybe guys you can try use this version: https://github.com/icloud-photos-downloader/icloud_photos_downloader/pull/608
Maybe guys you can try use this version: #608
It is working!
按你的步骤还是无法成功, 直接安装pyicloud和修改版就可以了, 不需要安装原版了: 0. 如果安装了原版则先卸载: pip uninstall icloudpd
- pip install pyicloud
- sed -i -e "s#icloud.com/#icloud.com.cn/#" -e "s#icloud.com"#icloud.com.cn"#" "$(pip show pyicloud | grep "Location" | awk '{print $2}')/pyicloud/base.py"
- git clone https://github.com/mbax2zf2/icloud_photos_downloader.git
- cd icloud_photos_downloader && python setup.py build && python setup.py install
- 结束了,应该可以正常登录了
@nicolz 感谢!完美解决!
1.14.0 same
C:\Users\jiaoting\Downloads\下载暂存\icloudpd>icloud.exe --username jiaoting@126.com --delete-from-keyring --domain cn --outputfile
Enter iCloud password for jiaoting@126.com:
Save password in keyring? [y/N]: n
Two-step authentication required. Your trusted devices are:
Traceback (most recent call last):
File "icloud.py", line 5, in
还没解决吗?
Overview
Trace info:
It seems the domain
accountservice.p00.prod.me.com
is removed from apple.ref to: https://github.com/boredazfcuk/docker-icloudpd/issues/227
Steps to Reproduce
Expected Behavior
Actual Behavior
Context