core
core copied to clipboard
ICloud integration gives invalid auth w/ app-specific pw
The problem
I'm attempting to setup the iCloud integration w/ an app-specific password, per the instructions here.
Upon hitting submit, I get a short spinner and then "Invalid authentication" — and I cannot proceed beyond this error to finish setting up the icloud integration. I've also tried the suggested troubleshooting step of removing the .storage/icloud directory, to no avail. (which is created upon attempting to setup the integration, but removing it has no affect on the issue)
I have confirmed that I've entered the app-specific password correct, and attempted several different passwords I've generated on appleid.apple.com.
What is version of Home Assistant Core has the issue?
core-2021.7.4
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/#app-specific-passwords
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2021-08-03 23:05:32 ERROR (SyncWorker_40) [pyicloud.base] Missing apple_id field
2021-08-03 23:05:32 ERROR (MainThread) [homeassistant.components.icloud.config_flow] Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))
Additional information
No response
icloud documentation icloud source (message by IssueLinks)
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)
same here, app password doesn't work.
same for me
same: these occur in logs
Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))
Bump!
i am facing the same issue.
Any update on same
i am waiting for this issue to get resolve ASAP because my presence detection automation is completely blocked because of that issue .Please respond if there is any update regarding this issue. Thanks in advance.
same here
I'm experiencing the same running 2021.8.8. Both with my actual icloud pw as well as app specific pw. I've also tried with 2 separate icloud accounts. Additionally i've spun up multiple VM's to try and isolate all other factors and have even downgraded Core to 2021.7.x which is where I had it running last but even that doesn't seem to work. My assumption was the the version of Core was potentially the issue but now I'm wondering if the integration itself has a 'version' that isn't manageable within the context of HA itself and potentially that is the issue. I've spent quite a bit of time trying to isolate this and can't figure out what is different...
The specific behavior for me is after entering my un/pw on the below screen, I get the Apple prompt immediately asking to allow a login. I proceed to the 6 digit code dialog but the dialog below just spins continuously for a very long time and i never get prompted to enter the code.
I have the same experience as @pauly7300
I'm experiencing the same running 2021.8.8. Both with my actual icloud pw as well as app specific pw. I've also tried with 2 separate icloud accounts. Additionally i've spun up multiple VM's to try and isolate all other factors and have even downgraded Core to 2021.7.x which is where I had it running last but even that doesn't seem to work. My assumption was the the version of Core was potentially the issue but now I'm wondering if the integration itself has a 'version' that isn't manageable within the context of HA itself and potentially that is the issue. I've spent quite a bit of time trying to isolate this and can't figure out what is different...
The specific behavior for me is after entering my un/pw on the below screen, I get the Apple prompt immediately asking to allow a login. I proceed to the 6 digit code dialog but the dialog below just spins continuously for a very long time and i never get prompted to enter the code.
<img alt="2021-08-30_13-34-07" width="468" src="https://user-images.githubusercontent.com/11494052/131388098-1df4ba36-513f-4ce4-8cff-b9648103beff.png"
Same issue on 2021.9.1
Error in logs:
Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))
Same issue, same error, same logs here on latest HAOS with latest Core, Supervisor versions. Can I help somehow to fix it?
Same issue here with app-specific password... I played a little bit with the underlying code samples of pyiCloud (https://github.com/picklepete/pyicloud) and the sample code showed the same error when using my AppleID / app-specific password... raising a ticket there and hoping that the developer will react.
Thanks for the update
I'm experiencing the same running 2021.8.8. email address and password are accepted. But verification code is accepted and constantly rejected by the iCloud integration app. Logger: homeassistant.components.icloud.config_flow Source: components/icloud/config_flow.py:272 Integration: Apple iCloud (documentation, issues) First occurred: 2:11:28 AM (2 occurrences) Last logged: 2:11:37 AM
Failed to verify verification code: (401)
I have the same issue too...
Is there going to be a resolution for this? It seems as though this hasn't been noticed by a developer
I did more digging with the underlying pyicloud library (see comment in my issue there) - seems like pyicloud is emulating to be a web browser and not using any official API. Apparently, Apple changed the login flow or rejects app-specific passwords completely now - in any case the library no longer receives the necessary login tokens to work. My conclusion is that we need a rewrite of pyicloud for app-specific passwords or another library for the icloud plugin in Home Assistant... :(
bad news.. thanks any way....
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.
still an issue
Same for me, still can't login using the app specific pw, getting Invalid authentication error. In the logs: 2022-01-18 09:08:43 ERROR (SyncWorker_3) [pyicloud.base] Missing apple_id field 2022-01-18 09:08:43 ERROR (MainThread) [homeassistant.components.icloud.config_flow] Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))
same here :(
even deleting the .storage/icloud/ folder and restarting did not work
this is not being actively worked on, don't' expect any fixes. I have abandoned this integration, should be marked broken IMHO.
same here :( even deleting the
.storage/icloud/folder and restarting did not work
Same here.
Same as everyone else :( give app specific passwords unto me!
I've had a little dive into this, and it seems completely impossible to use app-passwords the way it's currently setup. The icloud integration uses the icloud web interface and the web interface does not appear to support app passwords.
I'm not sure if apple actually exposes the "find my" api through regular means. If they do, it might be possible to completely rewrite this but I'm expecting that they do not support 3rd party access to "find my".
Any news for this? Here same, dosent work anymore and icloud forder + restart dont help even :(
I have the same issue as well. Way beyond my league to even consider fixing it, but it would really be appreciated!