Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[China] KeyError: 'dsInfo' #545

Closed
aliuweiwei opened this issue Jan 26, 2023 · 10 comments
Closed

[China] KeyError: 'dsInfo' #545

aliuweiwei opened this issue Jan 26, 2023 · 10 comments
Assignees
Labels

Comments

@aliuweiwei
Copy link

Enter iCloud password for [email protected]:
Traceback (most recent call last):
File "/usr/bin/icloud", line 33, in
sys.exit(load_entry_point('pyicloud-ipd==0.10.1', 'console_scripts', 'icloud')())
File "/usr/lib/python3.8/site-packages/pyicloud_ipd/cmdline.py", line 200, in main
api = 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 219, in authenticate
self.params.update({'dsid': resp['dsInfo']['dsid']})
KeyError: 'dsInfo'
2023-01-26 16:31:30 INFO Correct owner on config directory, if required
2023-01-26 16:31:30 INFO Correct group on config directory, if required
2023-01-26 16:31:30 INFO Generate 2FA cookie using password stored in keyring file.
iCloud Password:
Traceback (most recent call last):
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 141, in init
password = get_password_from_keyring(apple_id)
File "/usr/lib/python3.8/site-packages/pyicloud_ipd/utils.py", line 40, in get_password_from_keyring
raise NoStoredPasswordAvailable(
pyicloud_ipd.exceptions.NoStoredPasswordAvailable: No pyicloud password for [email protected] could be found in the system keychain. Use the --store-in-keyring command-line option for storing a password for this username.

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 36, 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 219, in authenticate
self.params.update({'dsid': resp['dsInfo']['dsid']})
KeyError: 'dsInfo'

@aliuweiwei aliuweiwei added the bug label Jan 26, 2023
@derekhe
Copy link

derekhe commented Jan 27, 2023

same problem

@AndreyNikiforov
Copy link
Collaborator

@aliuweiwei @derekhe what are the step your are taking? In the log I see two requests for passwords from console and two tracebacks -- I did not see this before....

@AndreyNikiforov
Copy link
Collaborator

@aliuweiwei @derekhe Are you using icloudpd from mainland China by any chance? There is no support for .CN domain yet, so the error may be due to that limitation.

@no1ajian
Copy link

no1ajian commented Feb 9, 2023

@aliuweiwei @derekhe Are you using icloudpd from mainland China by any chance? There is no support for .CN domain yet, so the error may be due to that limitation.

@AndreyNikiforov i'm using a cn account, how do i apply the domain parameter? thanks!

@AndreyNikiforov
Copy link
Collaborator

@aliuweiwei @derekhe Are you using icloudpd from mainland China by any chance? There is no support for .CN domain yet, so the error may be due to that limitation.

@AndreyNikiforov i'm using a cn account, how do i apply the domain parameter? thanks!

Will be in next release (>1.8.1). We are releasing on Fridays if there are changes, so Feb 10.

You can get latest master branch and build docker your self: docker build -t icloudpd:dev . (note dot at the end). Then use docker run -it --rm icloudpd:dev icloudpd --domain cn ... (note name of the image changed from regular icloudpd/icloudpd:1.8.1)

@no1ajian
Copy link

@aliuweiwei @derekhe Are you using icloudpd from mainland China by any chance? There is no support for .CN domain yet, so the error may be due to that limitation.

@AndreyNikiforov i'm using a cn account, how do i apply the domain parameter? thanks!

Will be in next release (>1.8.1). We are releasing on Fridays if there are changes, so Feb 10.

You can get latest master branch and build docker your self: docker build -t icloudpd:dev . (note dot at the end). Then use docker run -it --rm icloudpd:dev icloudpd --domain cn ... (note name of the image changed from regular icloudpd/icloudpd:1.8.1)

thanks. looking forward to the newer version

@AndreyNikiforov
Copy link
Collaborator

try >=1.9.0. The issue should be fixed there with --domain cn parameter. Re-open this issue if problem persists.

@aliuweiwei
Copy link
Author

try >=1.9.0. The issue should be fixed there with --domain cn parameter. Re-open this issue if problem persists.

@AndreyNikiforov Thank you very much for recovering my problems in such a timely manner. I really use a user from cn. The deployment of the container based on the latest version is still not successful, but it is feasible to deploy the container using a US account. This is an error encountered during deployment. The information of 2FA was received, but it could not be entered.
/**********************/
docker run -it --rm --name icloudpd
-v /mnt/user/iCloud:/data
-v $(pwd)/cookies:/cookies
-e TZ=Asia/Shanghai
icloudpd/icloudpd:1.9.0
icloudpd --directory /data
--cookie-directory /cookies
--folder-structure {:%Y/%Y-%m-%d}
--username [email protected]
--password mypassword
--size original
--recent 500
--auto-delete
--domain cn
/error
/
2023-02-12 14:35:28 DEBUG Authenticating...
2023-02-12 14:35:32 INFO Two-step/two-factor authentication is required!
Traceback (most recent call last):
File "icloudpd.py", line 5, in
File "click/core.py", line 1130, in call
File "click/core.py", line 1055, in main
File "click/core.py", line 1404, in invoke
File "click/core.py", line 760, in invoke
File "icloudpd/base.py", line 275, in main
File "icloudpd/authentication.py", line 48, in authenticate_
File "icloudpd/authentication.py", line 55, in request_2sa
File "pyicloud_ipd/base.py", line 266, in trusted_devices
File "requests/sessions.py", line 600, in get
File "pyicloud_ipd/base.py", line 105, in request
File "pyicloud_ipd/base.py", line 127, in _raise_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
[1] Failed to execute script 'icloudpd' due to unhandled exception!

@AndreyNikiforov
Copy link
Collaborator

it is feasible to deploy the container using a US account

@aliuweiwei What does that mean? Did you try connecting from China with US account and it worked?

I do not have an ability to try icloudpd from China, so I have to rely on user to provide as much detail as possible...

@AndreyNikiforov AndreyNikiforov changed the title KeyError: 'dsInfo' [China] KeyError: 'dsInfo' Dec 3, 2023
@AndreyNikiforov
Copy link
Collaborator

no response from the issue reporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants