question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authentication failed because China mainland account migated to icloud.com.cn instead of icloud.com(with solution)

See original GitHub issue

Hi,

Suddenly, this great tool stop working since 18/Nov, I didn’t touch anything on the server running it. I didn’t change my icloud password as well!

I installed it in Ubuntu, with Python 3.8.10. Anyone can help me? I really love this tool.

Error message are:

2021-11-20 15:02:31 DEBUG    Authenticating...
Traceback (most recent call last):
  File "/usr/local/bin/icloudpd", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/icloudpd/base.py", line 255, in main
    icloud = authenticate(
  File "/usr/local/lib/python3.8/dist-packages/icloudpd/authentication.py", line 29, in authenticate
    icloud = pyicloud_ipd.PyiCloudService(
  File "/usr/local/lib/python3.8/dist-packages/pyicloud_ipd/base.py", line 193, in __init__
    self.authenticate()
  File "/usr/local/lib/python3.8/dist-packages/pyicloud_ipd/base.py", line 219, in authenticate
    self.params.update({'dsid': resp['dsInfo']['dsid']})
KeyError: 'dsInfo'

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:44 (1 by maintainers)

github_iconTop GitHub Comments

19reactions
ShifengHuGitcommented, Nov 25, 2021

update the file : site-packages/pyicloud_ipd/base.py

find the keywords icloud.com, there are only 2 lines, replace it with the icloud.com.cn. it should get back

150         self._home_endpoint = 'https://www.icloud.com.cn'
151         self._setup_endpoint = 'https://setup.icloud.com.cn/setup/ws/1'
3reactions
shaoj0013commented, Dec 16, 2021

For your info, the file need to be updated, the absolute path is: /usr/local/lib/python3.8/dist-packages/pyicloud_ipd/base.py

更新base.py为icloud.com.cn后,A账号可以同步了,但是B账号又不行了,同样都是中国的AB两个账号,一个是通过icloud.com完成验证,另一个却是通过icloud.com.cn验证,请问知道如何改成一样的吗? image

你用B账号从web登陆一次icloud.com以后应该就可以了

web登陆一次icloud.com也似乎不起作用,不会自动引导到icloud.com.cn去,而我手动通过icloud.com.cn登录账户,却会引导我去iCloud.com登录,就像发的图片那样,不然就无法进入。

我跟你一样的问题,两个账号怎么也弄不成一致的。没办法自己修改了一下base.py,判断当前apple_id是哪一个,替换设置不同的host。 我的解决了!!配置文件加一行就好!

–env icloud_china=True \

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learn more about iCloud in China mainland - Apple Support
Learn about the changes to iCloud services in China mainland. iCloud in China mainland is operated by GCBD (AIPO Cloud (Guizhou) Technology Co....
Read more >
Apple's China iCloud data migration sweeps up ... - TechCrunch
Apple's plan to migrate China-based iCloud user accounts to a local host on Chinese soil is already running into controversy after the ......
Read more >
How do I migrate an expired Mobile Me account to iCloud?
Have you verified your account and password are still OK at appleid.apple.com - that site is very, very busy at the moment. You...
Read more >
International User Accounts Swept Up in Chinese iCloud Data ...
Apple's announcement on Wednesday that its iCloud services in mainland China will be handed over to a Chinese company has already run into ......
Read more >
Error Connecting Apple ID, Verification Failed. How-To Fix
connect via wifi · Go to Settings >iCloud · Click on your account · Generate a verification code from another Apple device that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found