core icon indicating copy to clipboard operation
core copied to clipboard

Apple iCloud integration - unable to login

Open hing4ling opened this issue 1 year ago • 5 comments

The problem

Noticed that intergation was in error and tried to login but that kept failing. Have tried deleting integration, new app specific password and main 2FA password.

What version of Home Assistant Core has the issue?

core-2024.10.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

iCloud

Link to integration documentation on our website

https://www.home-assistant.io/integrations/icloud/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: pyicloud.base
Source: /usr/local/lib/python3.12/site-packages/pyicloud/base.py:188
First occurred: 00:25:42 (6 occurrences)
Last logged: 00:27:17

Service Temporarily Unavailable (503)
Authentication required for Account. (450)

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:448
First occurred: 00:25:42 (3 occurrences)
Last logged: 00:27:17

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 370, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 417, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 520, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/icloud/config_flow.py", line 181, in async_step_user
    return await self._validate_and_create_entry(user_input, "user")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/icloud/config_flow.py", line 140, in _validate_and_create_entry
    devices = await self.hass.async_add_executor_job(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyicloud/base.py", line 543, in devices
    return FindMyiPhoneServiceManager(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyicloud/services/findmyiphone.py", line 26, in __init__
    self.refresh_client()
  File "/usr/local/lib/python3.12/site-packages/pyicloud/services/findmyiphone.py", line 34, in refresh_client
    req = self.session.post(
          ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyicloud/base.py", line 131, in request
    return self.request(method, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyicloud/base.py", line 133, in request
    self._raise_error(response.status_code, response.reason)
  File "/usr/local/lib/python3.12/site-packages/pyicloud/base.py", line 189, in _raise_error
    raise api_error
pyicloud.exceptions.PyiCloudAPIResponseException: Authentication required for Account. (450)

Additional information

Unable to login. EIther with app-specific or main password.

I deleted integration hoping that was the issue and reinstall might fix the problem. No change.

hing4ling avatar Oct 20 '24 00:10 hing4ling

Hey there @quentame, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (icloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of icloud can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign icloud Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


icloud documentation icloud source (message by IssueLinks)

home-assistant[bot] avatar Oct 20 '24 00:10 home-assistant[bot]

Just upgraded to 2024.10.3 few minutes ago and same problem occur. Tried both app-specific or main password.

huuscript avatar Oct 20 '24 01:10 huuscript

Same with either type of password

jscherry avatar Oct 20 '24 01:10 jscherry

Just upgraded to 2024.10.3 few minutes ago and same problem occur. Tried both app-specific or main password.

same as you

ceodevach avatar Oct 20 '24 01:10 ceodevach

Same issue here. No longer working after upgrade to 2024.10.3

ToddG73 avatar Oct 20 '24 02:10 ToddG73

+1

alexanderznamensky avatar Oct 20 '24 05:10 alexanderznamensky

+1

dieewossmarthome avatar Oct 20 '24 05:10 dieewossmarthome

+1

roelnic avatar Oct 20 '24 07:10 roelnic

After the update to core 2024.10.3 the integration stopped working. If I try to set it up I receive the error message: "Unknown error occurred"

I tried to rollback to core 2024.10.2: I solved some other issues, but not this one.

Zi0mele avatar Oct 20 '24 08:10 Zi0mele

i tryed to remove the integration and set it up from zero but always have this error with specific password or main password image

Destroyer061090 avatar Oct 20 '24 10:10 Destroyer061090

I am having the same issue. Used password and application specific password. Also deleted iCloud folder in .storage.

DanoBoca avatar Oct 20 '24 13:10 DanoBoca

same here … Log Details (ERROR)

Logger: homeassistant.components.icloud.config_flow Source: components/icloud/config_flow.py:128 integration: Apple iCloud (documentation, issues) First occurred: 15:53:09 (1 occurrences) Last logged: 15:53:09

Error logging into iCloud service: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))

Core 2024.10.3 Supervisor 2024.10.2 Operating System 13.2 Frontend 20241002.3

puls72s avatar Oct 20 '24 14:10 puls72s

Same error, I tried to create specific password to app on Apple, but no success.

mpkoslovsky avatar Oct 20 '24 14:10 mpkoslovsky

Deleted the .storage icloud folder to see if that did anything. No change.

Translation Error: The intl string context variable...

Your previously entered password for [email protected] is no longer working. Update your password to keep using this integration. Invalid authentication

SRP implementation bjorked it.

MrFutzy avatar Oct 20 '24 18:10 MrFutzy

Same here :-(

ik0adr avatar Oct 20 '24 18:10 ik0adr

same for me in Docker container

visio-nir avatar Oct 20 '24 22:10 visio-nir

I am facing the same issue since I updated to my HASS OS Pi to 2024.10.3. Nothing works.

sayam93 avatar Oct 20 '24 23:10 sayam93

same

RadDip avatar Oct 20 '24 23:10 RadDip

same here . Regular password or App specific password from icloud.com dosn't work

seith007 avatar Oct 21 '24 05:10 seith007

+1

quim-net avatar Oct 21 '24 07:10 quim-net

stesso identico problema

voyagerft avatar Oct 21 '24 10:10 voyagerft

+1

dbruynb avatar Oct 21 '24 10:10 dbruynb

+1

zequnchen avatar Oct 21 '24 13:10 zequnchen

+1, from Italy

andrea-git avatar Oct 21 '24 14:10 andrea-git

+1

TobiMarn avatar Oct 21 '24 18:10 TobiMarn

+1 from germany

BlaXun avatar Oct 22 '24 04:10 BlaXun

Same on 2024.9.3

Server131 avatar Oct 22 '24 11:10 Server131

Same here in germany

stappoe avatar Oct 22 '24 13:10 stappoe

Same issues here on latest core update

MasonJohnn avatar Oct 23 '24 01:10 MasonJohnn

Same here

AuroreVgn avatar Oct 23 '24 10:10 AuroreVgn