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

docker cannot be deployed normally #572

Closed
Aiaiioi opened this issue Feb 5, 2023 · 7 comments
Closed

docker cannot be deployed normally #572

Aiaiioi opened this issue Feb 5, 2023 · 7 comments
Assignees
Labels

Comments

@Aiaiioi
Copy link

Aiaiioi commented Feb 5, 2023

Overview

docker cannot be deployed normally

2023-02-05 13:32:04 DEBUG Authenticating......................

Steps to Reproduce

  1. docker pull icloudpd/icloudpd:1.8.1
docker run -it --rm --name icloudpd \
    -v $(pwd)/Photos:/data \
    -v $(pwd)/cookies:/cookies \
    -e TZ=Asia/Shanghai \
    -e icloud_china=True \
    icloudpd/icloudpd:1.8.1 \
    icloudpd --directory /data \
    --cookie-directory /cookies \
    --folder-structure {:%Y-%m} \
    --username [email protected] \
    --password 1234567 \
    --size original \
    --recent 5000 \
    --delete-after-download

Expected Behavior

normal deployment

Actual Behavior

2023-02-05 13:32:04 DEBUG    Authenticating...
Traceback (most recent call last):
  File "icloudpd.py", line 5, in <module>
  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 268, in main
  File "icloudpd/authentication.py", line 29, in authenticate
  File "pyicloud_ipd/base.py", line 193, in __init__
  File "pyicloud_ipd/base.py", line 219, in authenticate
KeyError: 'dsInfo'
[1] Failed to execute script 'icloudpd' due to unhandled exception!

Context

@Aiaiioi Aiaiioi added the bug label Feb 5, 2023
@AndreyNikiforov
Copy link
Collaborator

@Aiaiioi Seems to be the same issues as #545

The error happens during authentication, so I tried to repro with simplest command on M1 mac:

 docker run -it --rm icloudpd/icloudpd:1.8.1 icloudpd --username [email protected] --list-album

and after authentication with 2fa I got the list of albums.

We need to figure out how your case is different from mine. I can think of the difference to be:

  • account-related (e.g. your account does not have 2fa enabled)
  • location related (e.g. Apple uses different versions of their service and/response structure for you and me)
  • usage-related (e.g. I have clean login, but you have cookies from prev session that are causing different response from Apple)

Can you provide more details for your use case, please? If you can experiment with different scenarios it will be helpful too -- clean start (no cookies saved) with --list-albums command seems to be the best choice to start.

@AndreyNikiforov AndreyNikiforov self-assigned this Feb 5, 2023
@AndreyNikiforov
Copy link
Collaborator

@Aiaiioi Seems to be the same issues as #545

The error happens during authentication, so I tried to repro with simplest command on M1 mac:

 docker run -it --rm icloudpd/icloudpd:1.8.1 icloudpd --username [email protected] --list-album

and after authentication with 2fa I got the list of albums.

We need to figure out how your case is different from mine. I can think of the difference to be:

  • account-related (e.g. your account does not have 2fa enabled)
  • location related (e.g. Apple uses different versions of their service and/response structure for you and me)
  • usage-related (e.g. I have clean login, but you have cookies from prev session that are causing different response from Apple)

Can you provide more details for your use case, please? If you can experiment with different scenarios it will be helpful too -- clean start (no cookies saved) with --list-albums command seems to be the best choice to start.

I was ignorant -- just noticed -e icloud_china=True and TZ in your command, so all/most of my questions are answered now. Unless I missed the code somehow, but icloud_china=True is not supported in this project yet. There are many forks and I believe some of them may have implemented support to china .CN domain. I hope we can incorporate that support soon too.

@Aiaiioi
Copy link
Author

Aiaiioi commented Feb 5, 2023

@Aiaiioi Seems to be the same issues as #545
The error happens during authentication, so I tried to repro with simplest command on M1 mac:

 docker run -it --rm icloudpd/icloudpd:1.8.1 icloudpd --username [email protected] --list-album

and after authentication with 2fa I got the list of albums.
We need to figure out how your case is different from mine. I can think of the difference to be:

  • account-related (e.g. your account does not have 2fa enabled)
  • location related (e.g. Apple uses different versions of their service and/response structure for you and me)
  • usage-related (e.g. I have clean login, but you have cookies from prev session that are causing different response from Apple)

Can you provide more details for your use case, please? If you can experiment with different scenarios it will be helpful too -- clean start (no cookies saved) with command seems to be the best choice to start.--list-albums

I was ignorant -- just noticed and TZ in your command, so all/most of my questions are answered now. Unless I missed the code somehow, but is not supported in this project yet. There are many forks and I believe some of them may have implemented support to china .CN domain. I hope we can incorporate that support soon too.-e icloud_china=True``icloud_china=True

thank you for your reply. I searched for issues carefully, and then the test with the account in the non-China region can work normally. It seems that it should be a problem with the account in the China region. Looking forward to icloud_china = True. Thanks again.

@AndreyNikiforov
Copy link
Collaborator

please try >=1.9.0

@luyud
Copy link

luyud commented Feb 12, 2023

please try >=1.9.0

I add --domain 'cn' and get error, at the same time my phone received the 2FA verification request.

2023-02-12 05:31:27 DEBUG    Authenticating...
2023-02-12 05:31:31 INFO     Two-step/two-factor authentication is required!
Traceback (most recent call last):
  File "icloudpd.py", line 5, in <module>
  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!

@1994668171
Copy link

at the same time my phone received the 2FA verification request.

Is it solved? I'm having the same problem as you

@AndreyNikiforov
Copy link
Collaborator

at the same time my phone received the 2FA verification request.

Is it solved? I'm having the same problem as you

AFAIK --domain parameter alone did not help with connecting to iCloud from mainland China.

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