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 authentication while logging into iCloud with App Specific Passwords #54473

Closed
shailyglobal83 opened this issue Aug 11, 2021 · 11 comments

Comments

@shailyglobal83
Copy link

shailyglobal83 commented Aug 11, 2021

The problem

when i try to login to apple iCloud for presence detection then i encountered with the error as "Invalid authentication" and in console it show me an error "Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))" Can some one look into this issue as presence detection automation is completely blocked because of this issue.

i have refer this link for setup iCloud presence detection: https://www.home-assistant.io/integrations/icloud/

What is version of Home Assistant Core has the issue?

2021.8.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Apple iCloud Presence detection

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))

Additional information

No response

@probot-home-assistant
Copy link

icloud documentation
icloud source
(message by IssueLinks)

@probot-home-assistant
Copy link

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!
(message by CodeOwnersMention)

@Kirbo
Copy link

Kirbo commented Aug 12, 2021

EDIT: Actually my problem is related to this issue #53926


I can't even add this integration, the UI shows like this:
Screenshot 2021-08-12 at 13 39 24

..and getting errors in logs:

2021-08-12 13:37:54 ERROR (SyncWorker_12) [pyicloud.base] Missing apple_id field
2021-08-12 13:37:54 ERROR (MainThread) [homeassistant.components.icloud.config_flow] Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))

I created a new App Specific Password, which I'm using here.

Q: What do?

System Health

version core-2021.8.6
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.6
os_name Linux
os_version 5.10.17-v8
arch aarch64
timezone Europe/Helsinki
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4715
Installed Version 1.13.2
Stage running
Available Repositories 909
Installed Repositories 46
Home Assistant Cloud
logged_in true
subscription_expiration 14 August 2021, 3:00
relayer_connected true
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 6.2
update_channel stable
supervisor_version supervisor-2021.06.8
docker_version 20.10.6
disk_total 228.5 GB
disk_used 39.8 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok

@ruddj
Copy link

ruddj commented Sep 5, 2021

Just adding I am experiencing same issue trying to add the iCloud integration using an App-Specific password.

From Logs

Logger: homeassistant.components.icloud.config_flow
Source: components/icloud/config_flow.py:122
Integration: Apple iCloud (documentation, issues)
First occurred: 9:17:14 PM (5 occurrences)
Last logged: 9:20:52 PM

Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))

@AneticsUK
Copy link

Same issue present here, started just a few days ago

Logger: homeassistant.components.icloud.config_flow
Source: components/icloud/config_flow.py:122
Integration: Apple iCloud (documentation, issues)
First occurred: 23:32:20 (1 occurrences)
Last logged: 23:32:20
Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))

@npawelek
Copy link

Same issue here.

System Health

version core-2021.9.7
installation_type Unknown
dev false
hassio false
docker false
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.11.0-31-generic
arch x86_64
timezone America/Chicago
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4931
Installed Version 1.15.2
Stage running
Available Repositories 880
Installed Repositories 5
Home Assistant Cloud
logged_in true
subscription_expiration September 29, 2021, 7:00 PM
relayer_connected true
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok

@FabioEight
Copy link

Any update on this?

@github-actions
Copy link

github-actions bot commented Mar 6, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 6, 2022
@chrismanivong
Copy link
Contributor

As the code owners do not react, either here or in the duplicate issue ticket #57645 I will start reading Apples Documentation and the underlyings Python Apple iCloud library at the weekend and review the current code. I’ll let you know soon about it.

@chrismanivong
Copy link
Contributor

As underlying pyicloud uses just icloud web API, app specific passwords won't work. I investigated the documentation of pyicloud and for the time being, there is no possibility to get this working.
I still had not found documentation of Apple about the authentication and logon method of app-specific passwords. Once I get ahead, I would be able to add this functionality to pyicloud and in that case to iCloud integration on Home Assistant.

@github-actions github-actions bot removed the stale label Apr 1, 2022
@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants