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

Unable to re-auth. service not available #670

Open
moseslsy opened this issue Oct 19, 2024 · 59 comments
Open

Unable to re-auth. service not available #670

moseslsy opened this issue Oct 19, 2024 · 59 comments
Assignees

Comments

@moseslsy
Copy link

Describe the bug
My iCloudpd container suddenly stopped being able to connect to iCloud. Log says no MFA cookie and when I try to re-authenticate, it shows a service temporary unavailable.

I tried deleting the keyring_pass.cfg and running the initialization script but iCloud did not accept my password even though I can use the same password to log into iCloud web. Advanced Data Protection is not turned on.

System (The following information must be entered or the issue will be closed):

  • OS: Docker on Synology DSM

Debug log file

2024-10-19 17:34:43 INFO Container initialisation complete
2024-10-19 17:34:43 INFO Script launch parameters: --Initialise
2024-10-19 17:34:43 DEBUG Group, users:100, already created
2024-10-19 17:34:43 DEBUG User, Moses:1026, already created
2024-10-19 17:34:43 DEBUG Set owner and group on icloudpd temp directory
2024-10-19 17:34:43 DEBUG Set owner and group on config directory
2024-10-19 17:34:43 INFO Directory is writable: /config/python_keyring/
2024-10-19 17:34:43 DEBUG Configure password
2024-10-19 17:34:43 DEBUG Using password stored in keyring file: /config/python_keyring/keyring_pass.cfg
2024-10-19 17:34:43 INFO Starting container initialisation
2024-10-19 17:34:43 DEBUG 2024-10-19 17:34:43 INFO Correct owner on config directory, if required
2024-10-19 17:34:43 DEBUG 2024-10-19 17:34:43 INFO Correct group on config directory, if required
2024-10-19 17:34:43 DEBUG Generate MFA cookie using password stored in keyring file
2024-10-19 17:34:43 DEBUG Authenticating...
2024-10-19 17:34:44 ERROR Service Temporarily Unavailable (503)
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 211, in authenticate
File "requests/sessions.py", line 637, in post
File "pyicloud_ipd/session.py", line 122, in request
File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "starters/icloudpd.py", line 6, in
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 1179, in core
File "icloudpd/authentication.py", line 53, in authenticate_
File "pyicloud_ipd/base.py", line 157, in init
File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))
[783] Failed to execute script 'icloudpd' due to unhandled exception!
2024-10-19 17:34:45 ERROR Multifactor authentication information missing from cookie. Authentication has failed
2024-10-19 17:34:45 ERROR - Was the correct password entered?
2024-10-19 17:34:45 ERROR - Was the multifactor authentication code mistyped?
2024-10-19 17:34:45 ERROR - Can you log into icloud.com without receiving pop-up notifications?
2024-10-19 17:34:45 INFO Container initialisation complete
Moses@DS923plus:$ sudo docker exec -it icloudpd re-auth.sh
OCI runtime exec failed: exec failed: unable to start container process: exec: "re-auth.sh": executable file not found in $PATH: unknown
Moses@DS923plus:
$ sudo docker exec -it icloudpd reauth.sh
2024-10-19 17:36:50 DEBUG Authenticating...
2024-10-19 17:36:51 ERROR Service Temporarily Unavailable (503)
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 211, in authenticate
File "requests/sessions.py", line 637, in post
File "pyicloud_ipd/session.py", line 122, in request
File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "starters/icloudpd.py", line 6, in
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 1179, in core
File "icloudpd/authentication.py", line 53, in authenticate_
File "pyicloud_ipd/base.py", line 157, in init
File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))
[854] Failed to execute script 'icloudpd' due to unhandled exception!

@enstit
Copy link

enstit commented Oct 19, 2024

Same problem here!

2024-10-19 12:18:41 INFO     ***** boredazfcuk/icloudpd container v1.0.985_16-10-2024 started *****
2024-10-19 12:18:41 INFO     ***** For support, please go here: https://github.com/boredazfcuk/docker-icloudpd *****
2024-10-19 12:18:41 INFO     Alpine Linux 3.20.3
2024-10-19 12:18:41 INFO     Python version: 3.12.6
2024-10-19 12:18:42 INFO     icloud-photos-downloader version: 1.23.4
2024-10-19 12:18:42 INFO     Checking for updates...
2024-10-19 12:18:42 INFO      - Current version is up to date
2024-10-19 12:18:42 INFO     Loading configuration from: /config/icloudpd.conf
2024-10-19 12:18:59 INFO     Debug logging: Disabled
2024-10-19 12:18:59 INFO     Apple ID: <***-HIDDEN-***>
2024-10-19 12:18:59 INFO     Cookie path: /config/<***-HIDDEN-***>
2024-10-19 12:18:59 INFO     Cookie expiry notification period: 7
2024-10-19 12:18:59 INFO     Download destination directory: /home/user/iCloud
2024-10-19 12:18:59 INFO     Folder structure: {:%Y/%m/%d}
2024-10-19 12:18:59 INFO     Keep Unicode: false
2024-10-19 12:18:59 INFO     Live Photo MOV Filename Policy: suffix
2024-10-19 12:18:59 INFO     File Match Policy: name-size-dedup-with-suffix
2024-10-19 12:18:59 INFO     Synchronisation interval: 86400
2024-10-19 12:18:59 INFO     Synchronisation delay (minutes): 0
2024-10-19 12:18:59 INFO     Set EXIF date/time: false
2024-10-19 12:18:59 INFO     Auto delete: false
2024-10-19 12:18:59 INFO     Delete after download: false
2024-10-19 12:18:59 INFO     Delete empty directories: false
2024-10-19 12:18:59 INFO     Photo size: original
2024-10-19 12:18:59 INFO     Align RAW: as-is
2024-10-19 12:18:59 INFO     Single pass mode: false
2024-10-19 12:18:59 INFO     Skip download check: false
2024-10-19 12:18:59 INFO     Skip live photos: false
2024-10-19 12:18:59 INFO     Number of most recently added photos to download: Download All Photos
2024-10-19 12:18:59 INFO     Downloading photos from: Download All Photos
2024-10-19 12:18:59 INFO     Stop downloading when prexisiting files count is: Download All Photos
2024-10-19 12:18:59 INFO     Live photo size: original
2024-10-19 12:18:59 INFO     Skip videos: false
2024-10-19 12:18:59 INFO     Convert HEIC to JPEG: true
2024-10-19 12:18:59 INFO     Downloading from: icloud.com
2024-10-19 12:18:59 INFO     Fake user agent for curl: Disabled
2024-10-19 12:18:59 INFO     Authentication domain: com
2024-10-19 12:18:59 INFO     Ignore Synology extended attribute directories: Disabled
2024-10-19 12:18:59 INFO     Container initialisation complete
2024-10-19 12:18:59 INFO     Script launch parameters: --Initialize
2024-10-19 12:18:59 INFO     Directory is writable: /config/python_keyring/
2024-10-19 12:18:59 INFO     Starting container initialisation
2024-10-19 12:18:59 DEBUG    Authenticating...
2024-10-19 12:19:00 ERROR    Service Temporarily Unavailable (503)
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 211, in authenticate
  File "requests/sessions.py", line 637, in post
  File "pyicloud_ipd/session.py", line 122, in request
  File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

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 1179, in core
  File "icloudpd/authentication.py", line 53, in authenticate_
  File "pyicloud_ipd/base.py", line 157, in __init__
  File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))
[762] Failed to execute script 'icloudpd' due to unhandled exception!
2024-10-19 12:19:01 ERROR    Multifactor authentication information missing from cookie. Authentication has failed
2024-10-19 12:19:01 ERROR     - Was the correct password entered?
2024-10-19 12:19:01 ERROR     - Was the multifactor authentication code mistyped?
2024-10-19 12:19:01 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
2024-10-19 12:19:01 INFO     Container initialisation complete

@salvatooo
Copy link

same here too!

@breitero
Copy link

I confirm this! I‘ve reauthed the other 3 containers of my family yesterday where everything still was working…

@jlengrand
Copy link

Just to mention I'm also impacted. Tried to reauth to no avail

@Eagle248
Copy link

I think issue is happening for everyone. My containers stopped working from yesterday.

@baschte
Copy link

baschte commented Oct 19, 2024

Had the same problems. Think Apple has changed something here

@boredazfcuk
Copy link
Owner

No issue authenticating/downloading here.

Maybe it's temporary error, as suggested by the error, and will resolve itself soon... Or maybe it's a phased rollout of breaking changes that will hit other areas soon. I'm guessing it's region based as my containers are all fine.

@Prophet-Phoenix
Copy link

Prophet-Phoenix commented Oct 19, 2024

Can confirm too, also confirm, that i can login to icloud.com normally

2024-10-19 20:51:04 DEBUG    Authenticating...
2024-10-19 20:51:04 ERROR    Service Temporarily Unavailable (503)
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 211, in authenticate
  File "requests/sessions.py", line 637, in post
  File "pyicloud_ipd/session.py", line 122, in request
  File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

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 1179, in core
  File "icloudpd/authentication.py", line 53, in authenticate_
  File "pyicloud_ipd/base.py", line 157, in __init__
  File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))
[562] Failed to execute script 'icloudpd' due to unhandled exception!

@dotnjet
Copy link

dotnjet commented Oct 20, 2024

same issue still on, also here.

Traceback (most recent call last):
2024-10-20 10:56:14 ERROR Service Temporarily Unavailable (503)
File "pyicloud_ipd/base.py", line 211, in authenticate
File "requests/sessions.py", line 637, in post
File "pyicloud_ipd/session.py", line 122, in request
File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavail
able (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "starters/icloudpd.py", line 6, in
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 1179, in core
File "icloudpd/authentication.py", line 53, in authenticate_
File "pyicloud_ipd/base.py", line 157, in init
File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co
mbination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'
))
[15593] Failed to execute script 'icloudpd' due to unhandled exception!

@dotnjet
Copy link

dotnjet commented Oct 20, 2024

update: One container works fine the other one above has the problem.

@breitero
Copy link

Yes, the containers where the reauth process is more than 2 days ago are working correctly. Only these ones which need to be reauthed don‘t start…

@dotnjet
Copy link

dotnjet commented Oct 20, 2024

when you login to icloud.com you get a message with the info, that the cloud experience should be better with the new version. I guess Apple made some changes.

@biubiubiutiktok
Copy link

Is there a solution available?

@AndreyNikiforov
Copy link

solution available?

No. Apple seems to be disabling/limiting auth API used by icloudpd (and many other open source tools). The solution is to support new auth protocol. There are report that some tools might have done that already and icloudpd needs to get the same support. Timeline is unclear at the moment.

@jasjeetsuri
Copy link

Same issue here.

@wanglewis
Copy link

same issue by me

@baschte
Copy link

baschte commented Oct 21, 2024

Deleted everything and tried to configure new Container. Same issue as well

@boredazfcuk
Copy link
Owner

I'm still running OK... Still have 4 days until the cookies expire on my containers though. Assuming everything will die at that point.

@baschte
Copy link

baschte commented Oct 21, 2024

I'm still running OK... Still have 4 days until the cookies expire on my containers though. Assuming everything will die at that point.

Pls try to create a new instance and try to authorize. Think it wont work.

@alxgarci
Copy link

In another repo they are talking about the same, and think they have solved it! fastlane/fastlane#26368

@willis-pinaud
Copy link

Same issue here.

@vamitrou
Copy link

same here

@thedinz
Copy link

thedinz commented Oct 22, 2024

Me too

@radzio
Copy link

radzio commented Oct 22, 2024

It's caused by Apple SRP-6a implementation

home-assistant/core#128830
picklepete/pyicloud#456

@dotnjet
Copy link

dotnjet commented Oct 22, 2024

could this be a part of the solution?
icloud-photos-downloader/icloud_photos_downloader@4bcb2ac

@alpha520098
Copy link

For the sake of clarity, do you think a solution to this issue might be addressed in upcoming Home Assistant updates, or is the integration effectively deprecated? I also want to extend my sincere thanks to everyone actively working on a resolution.

@tom9865
Copy link

tom9865 commented Oct 23, 2024

Same error here - started after re-authentication

@boredazfcuk
Copy link
Owner

New container pushed with fix included. Seems that there may be a related issue that some people may experience. Please update this issue with results.

@mfenniak
Copy link

Updated to the latest container, reinitialized auth, and it worked flawlessly here. 👍

@dotnjet
Copy link

dotnjet commented Oct 25, 2024

it still does not work any more. Have tried with reauth.sh as well as sync-icloud.sh --initialise

2024-10-25 23:36:24 DEBUG Authenticating...
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
"serviceErrors" : [ {
"code" : "-20101",
"message" : "Enter the email or phone number and password for your Apple Acc
ount.",
"suppressDismissal" : false
} ]
} (401)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "starters/icloudpd.py", line 6, in
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 1183, in core
File "icloudpd/authentication.py", line 53, in authenticate_
File "pyicloud_ipd/base.py", line 160, in init
File "pyicloud_ipd/base.py", line 273, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co
mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code"
: "-20101",\n "message" : "Enter the email or phone number and password for y
our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)'))
[679] Failed to execute script 'icloudpd' due to unhandled exception!
2024-10-25 23:36:26 ERROR Multifactor authentication information missing from
cookie. Authentication has failed
2024-10-25 23:36:26 ERROR - Was the correct password entered?
2024-10-25 23:36:26 ERROR - Was the multifactor authentication code mistyped?
2024-10-25 23:36:26 ERROR - Can you log into icloud.com without receiving pop
-up notifications?
2024-10-25 23:36:26 INFO Container initialisation complete

@erkki193236
Copy link

New container pushed with fix included. Seems that there may be a related issue that some people may experience. Please update this issue with results.

After this update works like a charm! Thanks a lot!

@lazerdave
Copy link

Had to force update in unRAID, but now it's working great! Thank you!!!

@maydaytek
Copy link

Works greats after update and reinitializing. Thank you!

@JasSuri
Copy link

JasSuri commented Oct 26, 2024

Working for me now.

@moseslsy
Copy link
Author

New container pushed with fix included. Seems that there may be a related issue that some people may experience. Please update this issue with results.

Updated, re-initialised and it works well.

Thanks for the fix

@Eagle248
Copy link

Eagle248 commented Oct 26, 2024

Just wondering if anyone know, is it possible to auto delete old photos from icloud which are may be 180 days old? Talking in regards to any settings change in icloudpd

@McGerk
Copy link

McGerk commented Oct 26, 2024

Unfortunately, I still have the same problem as dotnjet:

Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
  "serviceErrors" : [ {
    "code" : "-20101",
    "message" : "Enter the email or phone number and password for your Apple Account.",
    "suppressDismissal" : false
  } ]
} (401)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "pyicloud_ipd/cmdline.py", line 258, in main_aux
  File "pyicloud_ipd/base.py", line 160, in __init__
  File "pyicloud_ipd/base.py", line 273, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('{\n  "serviceErrors" : [ {\n    "code" : "-20101",\n    "message" : "Enter the email or phone number and password for your Apple\xa0Account.",\n    "suppressDismissal" : false\n  } ]\n} (401)'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "starters/icloud.py", line 5, 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 "pyicloud_ipd/cmdline.py", line 82, in main
  File "pyicloud_ipd/cmdline.py", line 337, in main_aux

Both reauth, initialise or a completely new container lead to this message.

@jlengrand
Copy link

jlengrand commented Oct 26, 2024

Pulled the latest version, confirming I am one of the folks still having an issue :S.

pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('{\n  "serviceErrors" : [ {\n    "code" : "-20101",\n    "message" : "Enter the email or phone number and password for your Apple\xa0Account.",\n    "suppressDismissal" : false\n  } ]\n} (401)'))

EDIT : It seems I managed to fix this by running the reauth.sh command. The sync-icloud.sh --init was not sufficient.

Thanks for the hard work @boredazfcuk ! Much appreciated. Any other way to support you than crypto?

@blackfox33
Copy link

Even after pulling the latest version I got this error:

docker exec -it icloudpd reauth.sh --Initialise
2024-10-26 14:11:49 DEBUG    Authenticating...
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
  "serviceErrors" : [ {
    "code" : "-20283",
    "message" : "Enter the email or phone number and password for your Apple Account.",
    "suppressDismissal" : false
  } ]
} (401)

The above exception was the direct cause of the following exception:

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 1183, in core
  File "icloudpd/authentication.py", line 53, in authenticate_
  File "pyicloud_ipd/base.py", line 160, in __init__
  File "pyicloud_ipd/base.py", line 273, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('{\n  "serviceErrors" : [ {\n    "code" : "-20283",\n    "message" : "Enter the email or phone number and password for your Apple\xa0Account.",\n    "suppressDismissal" : false\n  } ]\n} (401)'))
[702] Failed to execute script 'icloudpd' due to unhandled exception!

I can login into icloud as normal in any browser.

@sloe57
Copy link

sloe57 commented Oct 26, 2024

Even after pulling the latest version I got this error:

docker exec -it icloudpd reauth.sh --Initialise
2024-10-26 14:11:49 DEBUG    Authenticating...
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
  "serviceErrors" : [ {
    "code" : "-20283",
    "message" : "Enter the email or phone number and password for your Apple Account.",
    "suppressDismissal" : false
  } ]
} (401)

The above exception was the direct cause of the following exception:

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 1183, in core
  File "icloudpd/authentication.py", line 53, in authenticate_
  File "pyicloud_ipd/base.py", line 160, in __init__
  File "pyicloud_ipd/base.py", line 273, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('{\n  "serviceErrors" : [ {\n    "code" : "-20283",\n    "message" : "Enter the email or phone number and password for your Apple\xa0Account.",\n    "suppressDismissal" : false\n  } ]\n} (401)'))
[702] Failed to execute script 'icloudpd' due to unhandled exception!

I can login into icloud as normal in any browser.

Exactly the same response for me.

@epheterson
Copy link

I'm hitting this issue as well, I had 3 containers (two with personal account, for myself and shared library, one for my partner). My two personal accounts worked fine, my partner's does not. All configured similarly, updated and was working fine before this auth issue. I tried the normal initialize method, and reauth.sh, and also can login fine with same credentials in the browser.

Any ideas how to get this container working again?

@boredazfcuk
Copy link
Owner

it still does not work any more. Have tried with reauth.sh as well as sync-icloud.sh --initialise

2024-10-25 23:36:24 DEBUG Authenticating... Traceback (most recent call last): File "pyicloud_ipd/base.py", line 270, in authenticate pyicloud_ipd.exceptions.PyiCloudAPIResponseException: { "serviceErrors" : [ { "code" : "-20101", "message" : "Enter the email or phone number and password for your Apple Acc ount.", "suppressDismissal" : false } ] } (401)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "starters/icloudpd.py", line 6, in 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 1183, in core File "icloudpd/authentication.py", line 53, in authenticate_ File "pyicloud_ipd/base.py", line 160, in init File "pyicloud_ipd/base.py", line 273, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code" : "-20101",\n "message" : "Enter the email or phone number and password for y our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)')) [679] Failed to execute script 'icloudpd' due to unhandled exception! 2024-10-25 23:36:26 ERROR Multifactor authentication information missing from cookie. Authentication has failed 2024-10-25 23:36:26 ERROR - Was the correct password entered? 2024-10-25 23:36:26 ERROR - Was the multifactor authentication code mistyped? 2024-10-25 23:36:26 ERROR - Can you log into icloud.com without receiving pop -up notifications? 2024-10-25 23:36:26 INFO Container initialisation complete

icloud-photos-downloader/icloud_photos_downloader#975

Problem has been reported upstream. Points to a password issue. I'd try running sync-icloud.sh --Remove-Keyring and then sync-icloud.sh --init

@boredazfcuk
Copy link
Owner

Any other way to support you than crypto?

Learn to code and submit pull requests :D

@dotnjet
Copy link

dotnjet commented Oct 26, 2024

it still does not work any more. Have tried with reauth.sh as well as sync-icloud.sh --initialise
2024-10-25 23:36:24 DEBUG Authenticating... Traceback (most recent call last): File "pyicloud_ipd/base.py", line 270, in authenticate pyicloud_ipd.exceptions.PyiCloudAPIResponseException: { "serviceErrors" : [ { "code" : "-20101", "message" : "Enter the email or phone number and password for your Apple Acc ount.", "suppressDismissal" : false } ] } (401)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "starters/icloudpd.py", line 6, in 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 1183, in core File "icloudpd/authentication.py", line 53, in authenticate_ File "pyicloud_ipd/base.py", line 160, in init File "pyicloud_ipd/base.py", line 273, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code" : "-20101",\n "message" : "Enter the email or phone number and password for y our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)')) [679] Failed to execute script 'icloudpd' due to unhandled exception! 2024-10-25 23:36:26 ERROR Multifactor authentication information missing from cookie. Authentication has failed 2024-10-25 23:36:26 ERROR - Was the correct password entered? 2024-10-25 23:36:26 ERROR - Was the multifactor authentication code mistyped? 2024-10-25 23:36:26 ERROR - Can you log into icloud.com without receiving pop -up notifications? 2024-10-25 23:36:26 INFO Container initialisation complete

icloud-photos-downloader/icloud_photos_downloader#975

Problem has been reported upstream. Points to a password issue. I'd try running sync-icloud.sh --Remove-Keyring and then sync-icloud.sh --init

Many thanks! I have tried it before and just tried it again without success.
I can successfully remove the key-ring. Init will not be successful, since it is asking 3 times for the password, which I definitely added correctly. Tested it even on icloud.com

2024-10-26 23:31:16 INFO Directory is writable: /config/python_keyring/
Running in MAIN
Enter iCloud password for [email protected]:
Bad username or password for [email protected]
Enter iCloud password for [email protected]:
Bad username or password for [email protected]
Enter iCloud password for [email protected]:
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
"serviceErrors" : [ {
"code" : "-20101",
"message" : "Enter the email or phone number and password for your Apple Acc
ount.",
"suppressDismissal" : false
} ]
} (401)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "pyicloud_ipd/cmdline.py", line 258, in main_aux
File "pyicloud_ipd/base.py", line 160, in init
File "pyicloud_ipd/base.py", line 273, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co
mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code"
: "-20101",\n "message" : "Enter the email or phone number and password for y
our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "starters/icloud.py", line 5, in
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 "pyicloud_ipd/cmdline.py", line 82, in main
File "pyicloud_ipd/cmdline.py", line 337, in main_aux
RuntimeError: Bad username or password for [email protected]
[613] Failed to execute script 'icloud' due to unhandled exception!
2024-10-26 23:32:15 ERROR Keyring file does not exist. Please try again

@blackfox33
Copy link

it still does not work any more. Have tried with reauth.sh as well as sync-icloud.sh --initialise
2024-10-25 23:36:24 DEBUG Authenticating... Traceback (most recent call last): File "pyicloud_ipd/base.py", line 270, in authenticate pyicloud_ipd.exceptions.PyiCloudAPIResponseException: { "serviceErrors" : [ { "code" : "-20101", "message" : "Enter the email or phone number and password for your Apple Acc ount.", "suppressDismissal" : false } ] } (401)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "starters/icloudpd.py", line 6, in 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 1183, in core File "icloudpd/authentication.py", line 53, in authenticate_ File "pyicloud_ipd/base.py", line 160, in init File "pyicloud_ipd/base.py", line 273, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code" : "-20101",\n "message" : "Enter the email or phone number and password for y our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)')) [679] Failed to execute script 'icloudpd' due to unhandled exception! 2024-10-25 23:36:26 ERROR Multifactor authentication information missing from cookie. Authentication has failed 2024-10-25 23:36:26 ERROR - Was the correct password entered? 2024-10-25 23:36:26 ERROR - Was the multifactor authentication code mistyped? 2024-10-25 23:36:26 ERROR - Can you log into icloud.com without receiving pop -up notifications? 2024-10-25 23:36:26 INFO Container initialisation complete

icloud-photos-downloader/icloud_photos_downloader#975
Problem has been reported upstream. Points to a password issue. I'd try running sync-icloud.sh --Remove-Keyring and then sync-icloud.sh --init

Many thanks! I have tried it before and just tried it again without success. I can successfully remove the key-ring. Init will not be successful, since it is asking 3 times for the password, which I definitely added correctly. Tested it even on icloud.com

2024-10-26 23:31:16 INFO Directory is writable: /config/python_keyring/ Running in MAIN Enter iCloud password for [email protected]: Bad username or password for [email protected] Enter iCloud password for [email protected]: Bad username or password for [email protected] Enter iCloud password for [email protected]: Traceback (most recent call last): File "pyicloud_ipd/base.py", line 270, in authenticate pyicloud_ipd.exceptions.PyiCloudAPIResponseException: { "serviceErrors" : [ { "code" : "-20101", "message" : "Enter the email or phone number and password for your Apple Acc ount.", "suppressDismissal" : false } ] } (401)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "pyicloud_ipd/cmdline.py", line 258, in main_aux File "pyicloud_ipd/base.py", line 160, in init File "pyicloud_ipd/base.py", line 273, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code" : "-20101",\n "message" : "Enter the email or phone number and password for y our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "starters/icloud.py", line 5, in 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 "pyicloud_ipd/cmdline.py", line 82, in main File "pyicloud_ipd/cmdline.py", line 337, in main_aux RuntimeError: Bad username or password for [email protected] [613] Failed to execute script 'icloud' due to unhandled exception! 2024-10-26 23:32:15 ERROR Keyring file does not exist. Please try again

Same result for me. It seems it does not accept the correct password.

@dotnjet
Copy link

dotnjet commented Oct 27, 2024

it still does not work any more. Have tried with reauth.sh as well as sync-icloud.sh --initialise
2024-10-25 23:36:24 DEBUG Authenticating... Traceback (most recent call last): File "pyicloud_ipd/base.py", line 270, in authenticate pyicloud_ipd.exceptions.PyiCloudAPIResponseException: { "serviceErrors" : [ { "code" : "-20101", "message" : "Enter the email or phone number and password for your Apple Acc ount.", "suppressDismissal" : false } ] } (401)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "starters/icloudpd.py", line 6, in 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 1183, in core File "icloudpd/authentication.py", line 53, in authenticate_ File "pyicloud_ipd/base.py", line 160, in init File "pyicloud_ipd/base.py", line 273, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code" : "-20101",\n "message" : "Enter the email or phone number and password for y our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)')) [679] Failed to execute script 'icloudpd' due to unhandled exception! 2024-10-25 23:36:26 ERROR Multifactor authentication information missing from cookie. Authentication has failed 2024-10-25 23:36:26 ERROR - Was the correct password entered? 2024-10-25 23:36:26 ERROR - Was the multifactor authentication code mistyped? 2024-10-25 23:36:26 ERROR - Can you log into icloud.com without receiving pop -up notifications? 2024-10-25 23:36:26 INFO Container initialisation complete

icloud-photos-downloader/icloud_photos_downloader#975
Problem has been reported upstream. Points to a password issue. I'd try running sync-icloud.sh --Remove-Keyring and then sync-icloud.sh --init

Many thanks! I have tried it before and just tried it again without success. I can successfully remove the key-ring. Init will not be successful, since it is asking 3 times for the password, which I definitely added correctly. Tested it even on icloud.com
2024-10-26 23:31:16 INFO Directory is writable: /config/python_keyring/ Running in MAIN Enter iCloud password for [email protected]: Bad username or password for [email protected] Enter iCloud password for [email protected]: Bad username or password for [email protected] Enter iCloud password for [email protected]: Traceback (most recent call last): File "pyicloud_ipd/base.py", line 270, in authenticate pyicloud_ipd.exceptions.PyiCloudAPIResponseException: { "serviceErrors" : [ { "code" : "-20101", "message" : "Enter the email or phone number and password for your Apple Acc ount.", "suppressDismissal" : false } ] } (401)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "pyicloud_ipd/cmdline.py", line 258, in main_aux File "pyicloud_ipd/base.py", line 160, in init File "pyicloud_ipd/base.py", line 273, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password co mbination.', PyiCloudAPIResponseException('{\n "serviceErrors" : [ {\n "code" : "-20101",\n "message" : "Enter the email or phone number and password for y our Apple\xa0Account.",\n "suppressDismissal" : false\n } ]\n} (401)'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "starters/icloud.py", line 5, in 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 "pyicloud_ipd/cmdline.py", line 82, in main File "pyicloud_ipd/cmdline.py", line 337, in main_aux RuntimeError: Bad username or password for [email protected] [613] Failed to execute script 'icloud' due to unhandled exception! 2024-10-26 23:32:15 ERROR Keyring file does not exist. Please try again

Same result for me. It seems it does not accept the correct password.

yes exactly. One time I even had to unlock the password on iCloud.com. Other times it was fine to log into icloud during the tests

@tom9865
Copy link

tom9865 commented Oct 27, 2024

Exactly the same problem here. :(
Tried removing keychain a few times, tried several times initialise.
I put in 100%. correct pw - login on iCloud possible without a problem.

Any ideas???

Issue:

`Traceback` (most recent call last):
  File "pyicloud_ipd/base.py", line 211, in authenticate
  File "requests/sessions.py", line 637, in post
  File "pyicloud_ipd/session.py", line 122, in request
  File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "pyicloud_ipd/cmdline.py", line 257, in main_aux
  File "pyicloud_ipd/base.py", line 157, in __init__
  File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "starters/icloud.py", line 5, 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 "pyicloud_ipd/cmdline.py", line 81, in main
  File "pyicloud_ipd/cmdline.py", line 336, in main_aux
RuntimeError: Bad username or password for *@*
[1344] Failed to execute script 'icloud' due to unhandled exception!
2024-10-27 19:35:52 ERROR    Keyring file does not exist. Please try `again`

In addition I get a message v980 is outdated, with every start of the container. That always leads to waiting time of 2min.

BR,
Tom

@Hakoexe
Copy link

Hakoexe commented Oct 27, 2024

New container pushed with fix included. Seems that there may be a related issue that some people may experience. Please update this issue with results.

Just updated both of my containers on Unraid via the Docker app - new 2fa works and everything works as intended -- Thanks again @boredazfcuk and the community on getting this fixed. We all appreciate it

@boredazfcuk
Copy link
Owner

File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
"serviceErrors" : [ {
"code" : "-20101",
"message" : "Enter the email or phone number and password for your Apple Acc
ount.",
"suppressDismissal" : false
} ]
} (401)

Some people have reported this can be resolved by changing the password on the account. Would need to set the new one on appleid.apple.com, remove the keyring from the container, then re-initialise.

@sloe57
Copy link

sloe57 commented Oct 27, 2024

File "pyicloud_ipd/base.py", line 270, in authenticate
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: {
"serviceErrors" : [ {
"code" : "-20101",
"message" : "Enter the email or phone number and password for your Apple Acc
ount.",
"suppressDismissal" : false
} ]
} (401)

Some people have reported this can be resolved by changing the password on the account. Would need to set the new one on appleid.apple.com, remove the keyring from the container, then re-initialise.

I would agree, ashamed to say that my Apple ID password was very old. I have now updated the password on the account, and successfully re initialised the container.

@dotnjet
Copy link

dotnjet commented Oct 27, 2024

I can confirm, that changing the password on iCloud up front is doing the job!


Running in MAIN
Enter iCloud password for [email protected]:
Save password in keyring? [y/N]: y

Two-step authentication required.
Please enter validation code
(string) --> 111111


@epheterson
Copy link

Glad to hear! Do we think it’s going to be possible to resolve the issue and keep the same password, or is this a necessary workaround? Since I’m backing up for another person, changing their password isn’t ideal.

@andymcray
Copy link

I´m sorry, but it doesn´t work for me :-(

  • changed password on icloud.com
  • logon on icloud.com without problems

2024-11-01 02:20:42 INFO ***** boredazfcuk/icloudpd container for icloud_photo_downloader v1.0.716 started *****
2024-11-01 02:20:42 INFO ***** For support, please go here: https://github.com/boredazfcuk/docker-icloudpd *****
2024-11-01 02:20:42 INFO Alpine Linux 3.19.0
2024-11-01 02:20:42 INFO Python version: 3.11.6
2024-11-01 02:20:42 INFO Loading configuration from: /config/icloudpd.conf
2024-11-01 02:20:42 DEBUG Running user id: 0
2024-11-01 02:20:42 DEBUG Running group id: 0
2024-11-01 02:20:42 DEBUG Local user: user1:1026
2024-11-01 02:20:42 DEBUG Local group: users:100
2024-11-01 02:20:42 DEBUG Force GID: false
2024-11-01 02:20:42 DEBUG LAN IP Address: 172.18.0.2
2024-11-01 02:20:42 DEBUG Default gateway: 172.18.0.1
2024-11-01 02:20:43 DEBUG DNS server: 127.0.0.11
2024-11-01 02:20:43 DEBUG IP address for icloud.com: 17.253.144.10
2024-11-01 02:20:49 DEBUG Route check to icloud.com successful
2024-11-01 02:20:49 DEBUG Apple ID: (hidden)
2024-11-01 02:20:49 INFO Authentication Type: MFA
2024-11-01 02:20:49 DEBUG Cookie path: /config/(hidden)
2024-11-01 02:20:49 INFO Cookie expiry notification period: 7
2024-11-01 02:20:49 INFO Download destination directory: /home/user1/iCloud
2024-11-01 02:20:49 INFO Folder structure: {:%Y/%m/%d}
2024-11-01 02:20:49 DEBUG Directory permissions: 750
2024-11-01 02:20:49 DEBUG File permissions: 640
2024-11-01 02:20:49 INFO Synchronisation interval: 43200
2024-11-01 02:20:49 INFO Synchronisation delay (minutes): 0
2024-11-01 02:20:49 INFO Set EXIF date/time: false
2024-11-01 02:20:49 INFO Auto delete: false
2024-11-01 02:20:49 INFO Delete after download: false
2024-11-01 02:20:49 INFO Photo size: original
2024-11-01 02:20:49 INFO Single pass mode: false
2024-11-01 02:20:49 INFO Skip download check: false
2024-11-01 02:20:49 INFO Skip live photos: false
2024-11-01 02:20:49 INFO Number of most recently added photos to download: Download All Photos
2024-11-01 02:20:49 INFO Downloading photos from: Download All Photos
2024-11-01 02:20:49 INFO Stop downloading when prexisiting files count is: Download All Photos
2024-11-01 02:20:49 INFO Live photo size: original
2024-11-01 02:20:49 INFO Skip videos: false
2024-11-01 02:20:49 INFO Convert HEIC to JPEG: true
2024-11-01 02:20:49 DEBUG JPEG conversion quality: 100
2024-11-01 02:20:49 INFO Downloading from: icloud.com
2024-11-01 02:20:49 INFO Authentication domain: com
2024-11-01 02:20:49 DEBUG Nextcloud synchronisation trigger: Disabled
2024-11-01 02:20:49 DEBUG Nextcloud upload: Disabled
2024-11-01 02:20:49 INFO Ignore Synology extended attribute directories: Enabled
2024-11-01 02:21:00 DEBUG Activated Python virtual environment for icloudpd: 1.17.3
2024-11-01 02:21:00 INFO Script launch parameters: --Initialise
2024-11-01 02:21:00 DEBUG Group, users:100, already created
2024-11-01 02:21:00 DEBUG User, user1:1026, already created
2024-11-01 02:21:00 DEBUG Set owner and group on icloudpd temp directory
2024-11-01 02:21:00 DEBUG Set owner and group on config directory
2024-11-01 02:21:00 INFO Directory is writable: /config/python_keyring/
2024-11-01 02:21:00 DEBUG Configure password
2024-11-01 02:21:00 DEBUG Adding password to keyring file: /config/python_keyring/keyring_pass.cfg
Enter iCloud password for [email protected]:
Bad username or password for [email protected]
Enter iCloud password for [email protected]:
Bad username or password for [email protected]
Enter iCloud password for [email protected]:
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 357, in authenticate
File "requests/sessions.py", line 637, in post
File "pyicloud_ipd/base.py", line 134, in request
File "pyicloud_ipd/base.py", line 207, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "pyicloud_ipd/cmdline.py", line 200, in main
File "pyicloud_ipd/base.py", line 305, in init
File "pyicloud_ipd/base.py", line 365, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "starters/icloud.py", line 5, in
File "pyicloud_ipd/cmdline.py", line 275, in main
RuntimeError: Bad username or password for [email protected]
[448] Failed to execute script 'icloud' due to unhandled exception!
2024-11-01 02:21:28 ERROR Keyring file does not exist. Please try again.

@blackfox33
Copy link

Changing the password worked for me on two accounts and three dockers.
I first changed the password on iCloud and removed the keyring on the docker with the sync-icloud.sh --Remove-Keyring command.
After that I could save the new password in the keyring file with sync-icloud.sh --init by typing the 2FA twice.
Now everything works smooth as before.

@tom9865
Copy link

tom9865 commented Nov 9, 2024

In my case w/o changing the password it works well now with setting up the container new with new yaml file.

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

No branches or pull requests