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

'Invalid email/password combination' error #506

Closed
raznoraznidzank opened this issue Dec 10, 2022 · 4 comments
Closed

'Invalid email/password combination' error #506

raznoraznidzank opened this issue Dec 10, 2022 · 4 comments
Labels

Comments

@raznoraznidzank
Copy link

Overview

The script generates "Invalid email/password combination." error with "Unknown reason" when it previously worked well.
I am NOT in China.

Steps to Reproduce

icloudpd -u '?????@????.???' -p '?????' --list-albums

Actual Behavior

pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.',
PyiCloudAPIResponseError('Unknown reason'))

Context

$ icloudpd -u '?????@????.???' -p '?????' --list-albums
2022-12-10 19:28:17 DEBUG Authenticating...
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pyicloud_ipd/base.py", line 209, in authenticate
req = self.session.post(
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pyicloud_ipd/base.py", line 100, in request
self._raise_error(code, reason)
File "/usr/local/lib/python3.9/site-packages/pyicloud_ipd/base.py", line 122, in _raise_error
raise api_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseError: Unknown reason

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/icloudpd", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/icloudpd/base.py", line 255, in main
icloud = authenticate(
File "/usr/local/lib/python3.9/site-packages/icloudpd/authentication.py", line 29, in authenticate
icloud = pyicloud_ipd.PyiCloudService(
File "/usr/local/lib/python3.9/site-packages/pyicloud_ipd/base.py", line 193, in init
self.authenticate()
File "/usr/local/lib/python3.9/site-packages/pyicloud_ipd/base.py", line 216, in authenticate
raise PyiCloudFailedLoginException(msg, error)
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.',
PyiCloudAPIResponseError('Unknown reason'))
$

@raznoraznidzank
Copy link
Author

The issue turned out to be a change of Apple ID e-mail address - I had to change the Apple ID password too. The correct password worked on Apple devices but not with icloud.com nor icloud_photos_downloader. I guess the Apple ID e-mail address contains salt for the password so whenever the Apple ID e-mail address is changed, the password eventually has to be changed too.

@staffankvisth
Copy link

Using icloudpd, version 1.16.3, Python 3.10.12 I suddenly started getting this same error after successfully downloading a few thousand photos in a first run with the command:
~/.local/bin/icloudpd -u [email protected] -p ****** -d . --folder-structure={:%Y/%m/%d} --delete-after-download
(of course using my real iCloud email address/passwd)
After this successful run ended ok, I checked my iCloud photo library on icloud.com and it said there where still some photos left, so I figured I should just run the script once more in order to fetch the rest of the photos:
~/.local/bin/icloudpd -u [email protected] -p ****** -d . --folder-structure={:%Y/%m/%d} --delete-after-download
But then I got this error:
2023-12-07 23:24:36 DEBUG Authenticating...
2023-12-07 23:24:36 ERROR Unknown reason
Traceback (most recent call last):
File "pyicloud_ipd/base.py", line 220, in authenticate
File "requests/sessions.py", line 637, in post
File "pyicloud_ipd/base.py", line 105, in request
File "pyicloud_ipd/base.py", line 127, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseError: Unknown reason

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "starters/icloudpd.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 "icloudpd/base.py", line 317, in main
File "icloudpd/base.py", line 744, in core
File "icloudpd/authentication.py", line 31, in authenticate_
File "pyicloud_ipd/base.py", line 204, in init
File "pyicloud_ipd/base.py", line 228, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseError('Unknown reason'))
[1357605] Failed to execute script 'icloudpd' due to unhandled exception!

...and I keep getting it ever since. I did not change anything in between runs, certainly not my Apple ID e-mail address. I double checked that the specified username/password was correct by successfully logging in on icloud.com using the same credentials. No problems accessing my iCloud photo library via web browser or on the iPhone. I have also tried afterwards to change my iCloud password, reset my password etc. but iCloudPD keeps throwing that same error and icloud.com works fine.
I also tried using the boredazfcuk/docker-icloudpd (https://github.com/boredazfcuk/docker-icloudpd) docker image, but it also fails with the same error when I perform the initialization. Oh, and i have 2FA enabled on my iCloud account.
Any idea of how to solve this problem?

@AndreyNikiforov
Copy link
Collaborator

Using icloudpd, version 1.16.3, Python 3.10.12 I suddenly started getting this same error after successfully downloading a few thousand photos in a first run with the command: ~/.local/bin/icloudpd -u [email protected] -p ****** -d . --folder-structure={:%Y/%m/%d} --delete-after-download (of course using my real iCloud email address/passwd) After this successful run ended ok, I checked my iCloud photo library on icloud.com and it said there where still some photos left, so I figured I should just run the script once more in order to fetch the rest of the photos: ~/.local/bin/icloudpd -u [email protected] -p ****** -d . --folder-structure={:%Y/%m/%d} --delete-after-download But then I got this error: 2023-12-07 23:24:36 DEBUG Authenticating... 2023-12-07 23:24:36 ERROR Unknown reason Traceback (most recent call last): File "pyicloud_ipd/base.py", line 220, in authenticate File "requests/sessions.py", line 637, in post File "pyicloud_ipd/base.py", line 105, in request File "pyicloud_ipd/base.py", line 127, in _raise_error pyicloud_ipd.exceptions.PyiCloudAPIResponseError: Unknown reason

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "starters/icloudpd.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 "icloudpd/base.py", line 317, in main File "icloudpd/base.py", line 744, in core File "icloudpd/authentication.py", line 31, in authenticate_ File "pyicloud_ipd/base.py", line 204, in init File "pyicloud_ipd/base.py", line 228, in authenticate pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseError('Unknown reason')) [1357605] Failed to execute script 'icloudpd' due to unhandled exception!

...and I keep getting it ever since. I did not change anything in between runs, certainly not my Apple ID e-mail address. I double checked that the specified username/password was correct by successfully logging in on icloud.com using the same credentials. No problems accessing my iCloud photo library via web browser or on the iPhone. I have also tried afterwards to change my iCloud password, reset my password etc. but iCloudPD keeps throwing that same error and icloud.com works fine. I also tried using the boredazfcuk/docker-icloudpd (https://github.com/boredazfcuk/docker-icloudpd) docker image, but it also fails with the same error when I perform the initialization. Oh, and i have 2FA enabled on my iCloud account. Any idea of how to solve this problem?

See #729

@KayhanKaynar
Copy link

I have the same problem guys. And I tried to make a fresh icloudpd install. even that is not working.
So if we started to have this problem at the same time, I assume there is a change on Apple side.
But I hope it is not a change like disabling in this integration. I had created my own automation for gallery/photos and it was working so smooth for the last two years. Also changed my apple password, and it did not help.. If someone have some news on that, can let us know?

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