home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.95k stars 31.01k forks source link

Apple iCloud integration - unable to login #128811

Open hing4ling opened 1 month ago

hing4ling commented 1 month ago

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.

home-assistant[bot] commented 1 month ago

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)

huuscript commented 1 month ago

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

jscherry commented 1 month ago

Same with either type of password

ceodevach commented 1 month ago

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

same as you

ToddG73 commented 1 month ago

Same issue here. No longer working after upgrade to 2024.10.3

alexanderznamensky commented 1 month ago

+1

dieewossmarthome commented 1 month ago

+1

roelnic commented 1 month ago

+1

Zi0mele commented 1 month ago

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.

Destroyer061090 commented 1 month ago

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

DanoBoca commented 1 month ago

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

puls72s commented 1 month ago

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

mpkoslovsky commented 1 month ago

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

MrFutzy commented 1 month ago

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 pat@drumbeats.ca is no longer working. Update your password to keep using this integration. Invalid authentication

SRP implementation bjorked it.

ik0adr commented 1 month ago

Same here :-(

visionir-io commented 1 month ago

same for me in Docker container

sayam93 commented 1 month ago

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

RadDip commented 1 month ago

same

seith007 commented 1 month ago

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

quim-net commented 1 month ago

+1

voyagerft commented 1 month ago

stesso identico problema

dbruynb commented 1 month ago

+1

zequnchen commented 1 month ago

+1

andrea-git commented 1 month ago

+1, from Italy

TobiMarn commented 1 month ago

+1

BlaXun commented 1 month ago

+1 from germany

Server131 commented 1 month ago

Same on 2024.9.3

stappoe commented 1 month ago

Same here in germany

MasonJohnn commented 1 month ago

Same issues here on latest core update

AuroreVgn commented 1 month ago

Same here

Billiadis commented 1 month ago

+1 from Greece

ingo916 commented 1 month ago

Same issue for me

rafalw1277 commented 1 month ago

Same issue for me from Poland

vagy66 commented 1 month ago

+1 from the Netherlands

osprey828 commented 1 month ago

+1 from Canada

stevenLeecode commented 1 month ago

+1, My email and app-specific password is not working. USA

sticks221 commented 1 month ago

Same here in UK using Pi. Tied application specific password and main password with MFA in iCloud and iCloud3 v3 but keep getting access denied.

DanoBoca commented 1 month ago

I don’t know who to inform.

Dan


From: sticks221 @.> Sent: Friday, October 25, 2024 5:57:30 PM To: home-assistant/core @.> Cc: Dan @.>; Comment @.> Subject: Re: [home-assistant/core] Apple iCloud integration - unable to login (Issue #128811)

Same here for iCloud and iCloud3 v3, tried application specific password and main password with MFA but keep getting access denied.

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/128811#issuecomment-2438936179, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7PXDOS7MQBACPYQMXIERLLZ5K5EVAVCNFSM6AAAAABQH6O33OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYHEZTMMJXHE. You are receiving this because you commented.Message ID: @.***>

aimerie commented 4 weeks ago

+1 - same issue here, tried app password and account password

Cabbina commented 4 weeks ago

+1

Destroyer061090 commented 4 weeks ago

I found on this thread a workaround.

Save the folder in custom_component, restart HA and add icloud integration. then login in iCloud using direct pwd (no specific app), it works 😄

https://github.com/user-attachments/files/17489782/icloud.zip

DanoBoca commented 4 weeks ago

Yes, thank you. It works Dan


From: Destroyer061090 @.> Sent: Sunday, October 27, 2024 6:21 AM To: home-assistant/core @.> Cc: Dan @.>; Comment @.> Subject: Re: [home-assistant/core] Apple iCloud integration - unable to login (Issue #128811)

I found on thishttps://github.com/home-assistant/core/issues/128830 thread a workaround.

Save the folder in custom_component, restart HA and add icloud integration. then login in iCloud using direct pwd (no specific app), it works 😄

https://github.com/user-attachments/files/17489782/icloud.zip

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/128811#issuecomment-2439946359, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7PXDOUBUAL43MFJVIRF2WDZ5SWDFAVCNFSM6AAAAABQH6O33OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZHE2DMMZVHE. You are receiving this because you commented.Message ID: @.***>

MasonColoretti commented 3 weeks ago

same here

Mowgly1977 commented 3 weeks ago

Stesso problema per me. Ho cancellato la cartella sotto . storage ma niente, ho provato anche inserendo la cartellla iclu sotto custom component come indicato qua sul forum ma niente.

ColinKlayer commented 2 weeks ago

+1

andrea-git commented 2 weeks ago

I found on this thread a workaround.

Save the folder in custom_component, restart HA and add icloud integration. then login in iCloud using direct pwd (no specific app), it works 😄

https://github.com/user-attachments/files/17489782/icloud.zip

Actually, it works for me, thank you!

DanoBoca commented 2 weeks ago

There is a new Release of the iCloud3 integration that takes care of the Apple changes for authentication.

Dan


From: andrea-git @.> Sent: Tuesday, November 5, 2024 3:17:06 AM To: home-assistant/core @.> Cc: Dan @.>; Comment @.> Subject: Re: [home-assistant/core] Apple iCloud integration - unable to login (Issue #128811)

I found on thishttps://github.com/home-assistant/core/issues/128830 thread a workaround.

Save the folder in custom_component, restart HA and add icloud integration. then login in iCloud using direct pwd (no specific app), it works 😄

https://github.com/user-attachments/files/17489782/icloud.zip

Actually, it works for me, thank you!

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/128811#issuecomment-2456508527, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7PXDOUX6DBZIXG7WPXTZKLZ7B5IFAVCNFSM6AAAAABQH6O33OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJWGUYDQNJSG4. You are receiving this because you commented.Message ID: @.***>

OLDIN commented 2 weeks ago

+1

tobst96 commented 2 weeks ago

+1

Server131 commented 2 weeks ago

This work around zip file option no longer works for me after 2024.11.0

Edit: Fixed - needed to remove the icloud folder from custom components, restart, re-upload, restart, configure.