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

Bad username or password during setup #622

Closed
Austinzveare opened this issue Aug 3, 2024 · 17 comments
Closed

Bad username or password during setup #622

Austinzveare opened this issue Aug 3, 2024 · 17 comments

Comments

@Austinzveare
Copy link

I just set this up using the Unraid template but can't seem to get past entering my Apple ID password. I have it set to MFA.

`Traceback (most recent call last):
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/base.py", line 241, in _authenticate_with_token
req = self.session.post(
^^^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/session.py", line 167, in request
self._raise_error(code or "Unknown", reason)
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/session.py", line 196, in _raise_error
raise api_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Missing apple_id field (Missing apple_id field)

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

Traceback (most recent call last):
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/cmdline.py", line 257, in main_aux
api = PyiCloudService(
^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/base.py", line 157, in init
self.authenticate()
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/base.py", line 221, in authenticate
self._authenticate_with_token()
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/base.py", line 247, in _authenticate_with_token
raise PyiCloudFailedLoginException(msg, error) from error
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field (Missing apple_id field)'))

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

Traceback (most recent call last):
File "/opt/icloudpd/bin/icloud", line 8, in
sys.exit(main())
^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/cmdline.py", line 81, in main
main_aux()
File "/opt/icloudpd/lib/python3.12/site-packages/pyicloud_ipd/cmdline.py", line 336, in main_aux
raise RuntimeError(message) from err
RuntimeError: Bad username or password for [email protected]
2024-08-03 16:18:12 ERROR Keyring file does not exist. Please try again`

@oliveryu97
Copy link

me too

@golgo13a
Copy link

golgo13a commented Aug 7, 2024

I get the same error... help!

@golgo13a
Copy link

golgo13a commented Aug 8, 2024

I just figured it out... my bad! I didn't create a directory called /config in the docker folder.

@Austinzveare
Copy link
Author

I just figured it out... my bad! I didn't create a directory called /config in the docker folder.

For anyone wondering this was indeed the case. I had config pointing to icloudpd's appdata folder, when it actually needed to point to a config folder within it's appdata folder.

@boredazfcuk
Copy link
Owner

The config directory is hard-coded to /config.

The unraid template isn't something I maintain and once upon a time, it was possible to configure the location of the config directory within the container. Presumably the Unraid template still allows you to configure the location, when the container itself ignore that configuration option now.

@boredazfcuk boredazfcuk closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2024
@RezzZ
Copy link

RezzZ commented Aug 26, 2024

I just figured it out... my bad! I didn't create a directory called /config in the docker folder.

For anyone wondering this was indeed the case. I had config pointing to icloudpd's appdata folder, when it actually needed to point to a config folder within it's appdata folder.

I'm not sure yet what to fix here. Running unraid too, but config is already mapped:
UpdateContainer 2024-08-26 10-12-10
inside the container, going to /config gives me the icloudpd.conf file which has the required fields to login. What am I missing?

my error:

2024-08-26 10:17:18 INFO     Starting container initialisation
2024-08-26 10:17:18 DEBUG    Authenticating...
2024-08-26 10:17:19 ERROR    Missing apple_id field (Missing apple_id field)
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 241, in _authenticate_with_token
  File "requests/sessions.py", line 637, in post
  File "pyicloud_ipd/session.py", line 167, in request
  File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Missing apple_id field (Missing apple_id field)

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 221, in authenticate
  File "pyicloud_ipd/base.py", line 247, in _authenticate_with_token
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field (Missing apple_id field)'))
[569] Failed to execute script 'icloudpd' due to unhandled exception!
2024-08-26 10:17:19 ERROR    Multifactor authentication information missing from cookie. Authentication has failed
2024-08-26 10:17:19 ERROR     - Was the correct password entered?
2024-08-26 10:17:19 ERROR     - Was the multifactor authentication code mistyped?
2024-08-26 10:17:19 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
2024-08-26 10:17:19 INFO     Container initialisation complete

@RezzZ
Copy link

RezzZ commented Aug 26, 2024

ok, I removed all variables from the unraid template and restarted the container. Initializing succeeded now :).

@Cantello
Copy link

Cantello commented Oct 21, 2024

ok, I removed all variables from the unraid template and restarted the container. Initializing succeeded now :).

When you say all variables, do you really mean all of them? I am currently stuck on the Bad username or password as well, the regular script can login with the credentials, the docker container (via an Unraid template here) cannot.

Enter iCloud password for [email protected]:
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 [email protected]
[549] Failed to execute script 'icloud' due to unhandled exception!
2024-10-21 16:55:14 ERROR    Keyring file does not exist. Please try again

@cfurrow
Copy link

cfurrow commented Oct 22, 2024

It's possible that it's an upstream pyicloud issue

pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

picklepete/pyicloud#456

Authentication is now SRP6a. Old UID/pwd method gets the 503.

It could also be a digital certificate change:

gcobb321/icloud3_v3#341

Looks like the digital certificate for apple.com might have just been updated. It says Not valid before Saturday 19 October 2024 at 04:00:26 Australian Eastern Daylight Time, which was early this morning here.

I'm getting the "Service Temporarily Unavailable (503)" as well, and pretty sure the timing lines up with Oct 19 when it started to fail for me.

Will wait a few more days and check in on things. Could require a few more to fix depending on the complexity.

Pretty sure this is not a boredazfcuk/docker-icloudpd issue, or even a icloud-photos-downloader/icloud_photos_downloader issue.

@RezzZ
Copy link

RezzZ commented Oct 22, 2024

ok, I removed all variables from the unraid template and restarted the container. Initializing succeeded now :).

When you say all variables, do you really mean all of them? I am currently stuck on the Bad username or password as well, the regular script can login with the credentials, the docker container (via an Unraid template here) cannot.

I only kept:
AppData Config Path
Synchronisation Interval (seconds)
Data
Time Zone
force_gid
(and the following under more settings:)
Command Line Options
Root
Directory Permissions
File Permissions
UMASK
User ID (PUID)
Group ID (PGID)

all other variables are stored in the
ipcloudpd/config/icloudpd.conf file which is in your appdata folder

@boredazfcuk
Copy link
Owner

boredazfcuk commented Oct 22, 2024

The only variable I create my container with is TZ=

The time zone is needed by the host OS, which is why I set it to be created with the container. Everything else is configured using the config file. The main reason for this is that all I do with the variables is write them to the config file, then use the config file to set the variables in the script.

AppData Config Path

Not sure what this is. Unraid variable maybe?

Synchronisation Interval (seconds)

Set via config file

Data

Not sure what this is

Time Zone

Not sure what this is, container uses TZ

force_gid

Set via config file

Command Line Options

This is no longer is used IIRC

Root

Not sure what this is, Unraid again?

Directory Permissions

Set via config file

File Permissions

Set via config file

UMASK

Not sure what this is, Unraid again maybe

User ID (PUID)

Not sure what this is, Unraid again maybe

Group ID (PGID)

Not sure what this is, Unraid again maybe

@boredazfcuk
Copy link
Owner

pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

Pretty sure this is not a boredazfcuk/docker-icloudpd issue, or even a icloud-photos-downloader/icloud_photos_downloader issue.

This

@boredazfcuk
Copy link
Owner

A proposed fix has submitted to the upstream project so I will update my container as soon as it's merged.

@RezzZ
Copy link

RezzZ commented Oct 22, 2024

The only variable I create my container with is TZ=

The time zone is needed by the host OS, which is why I set it to be created with the container. Everything else is configured using the config file. The main reason for this is that all I do with the variables is write them to the config file, then use the config file to set the variables in the script.

AppData Config Path

Not sure what this is. Unraid variable maybe?

Synchronisation Interval (seconds)

Set via config file

Data

Not sure what this is

Time Zone

Not sure what this is, container uses TZ

force_gid

Set via config file

Command Line Options

This is no longer is used IIRC

Root

Not sure what this is, Unraid again?

Directory Permissions

Set via config file

File Permissions

Set via config file

UMASK

Not sure what this is, Unraid again maybe

User ID (PUID)

Not sure what this is, Unraid again maybe

Group ID (PGID)

Not sure what this is, Unraid again maybe

yes, as I mentioned, all variables are from the unraid template file that uses this docker container.

@welshdylan
Copy link

has this been fixed now as i'm still getting the "bad username or password" or the 503 error?

@Symbiot78
Copy link

I've got the same issue. I've checked the pw so many times.
I set up 1 container with my icloud id.. works
then went to set up my wifes.. and am seeing the 'bad password....'
I tried removing the first container just to see if there was some bleed-through.. but no.. same problem.
Repulled, recreated, restarted..
removed folders, recreated them.
removed the .conf file and let it recreate that then reconfigured it.

but nothing works.

@Symbiot78
Copy link

I solved my issue.
I reset my wifes password. That worked for me.

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

9 participants