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

Error while setting up iCloud platforms for device_tracker & sensors #75940

Closed
mehhhhhhhhhhhhhhhhhhhhhhhhhh opened this issue Jul 29, 2022 · 39 comments · Fixed by #76437
Closed
Assignees

Comments

@mehhhhhhhhhhhhhhhhhhhhhhhhhh

The problem

The iCloud integration fails to setup under beta 2022.8.0 b2 with the following error:

`Logger: homeassistant.components.device_tracker
Source: components/icloud/device_tracker.py:46
Integration: Device tracker (documentation, issues)
First occurred: 10:01:31 AM (1 occurrences)
Last logged: 10:01:31 AM

Error while setting up icloud platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/icloud/device_tracker.py", line 46, in async_setup_entry
account.listeners.append(
AttributeError: 'IcloudAccount' object has no attribute 'listeners'
`

and

`Logger: homeassistant.components.sensor
Source: components/icloud/sensor.py:31
Integration: Sensor (documentation, issues)
First occurred: 10:01:31 AM (1 occurrences)
Last logged: 10:01:31 AM

Error while setting up icloud platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/icloud/sensor.py", line 31, in async_setup_entry
account.listeners.append(
AttributeError: 'IcloudAccount' object has no attribute 'listeners'
`

What version of Home Assistant Core has the issue?

core-2022.8.0b2

What was the last working version of Home Assistant Core?

core-2022.7.7

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

iCloud

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

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)

@jscherry
Copy link

Same exact problem.
Logger: homeassistant.components.device_tracker
Source: components/icloud/device_tracker.py:46
Integration: Device tracker (documentation, issues)
First occurred: 8:18:29 PM (1 occurrences)
Last logged: 8:18:29 PM

Error while setting up icloud platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/icloud/device_tracker.py", line 46, in async_setup_entry
account.listeners.append(
AttributeError: 'IcloudAccount' object has no attribute 'listeners'

@lucianosg
Copy link

The problem described above persists.

Home Assistant 2022.8.0b5
Supervisor 2022.07.1
Operating System 8.4
Frontend: 20220728.0 - latest

@mehhhhhhhhhhhhhhhhhhhhhhhhhh
Copy link
Author

Beta 7....Still broken.

@frenck
Copy link
Member

frenck commented Aug 3, 2022

@mehhhhhhhhhhhhhhhhhhhhhhhhhh No need report each version it is still broken. This issue is open at this point. Thanks 👍

@smarthomefamilyverrips
Copy link

Same issue just respond to follow :)

@bkr1969
Copy link

bkr1969 commented Aug 3, 2022

Has been glitchy for some time, stopped working with the same errors today.

Logger: pyicloud.base.http
Source: /usr/local/lib/python3.10/site-packages/pyicloud/base.py:141
First occurred: 14:37:46 (1 occurrences)
Last logged: 14:37:46

Failed to parse response with JSON mimetype


Error while setting up icloud platform for device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/icloud/device_tracker.py", line 46, in async_setup_entry
    account.listeners.append(
AttributeError: 'IcloudAccount' object has no attribute 'listeners'

@jweston2112
Copy link

adding to follow - Same issue here

@rchiileea
Copy link

same issue here on 2022.8 update, hope fix is availible soon or ill have to revert back to 2022.7

@smarthomefamilyverrips
Copy link

same issue here on 2022.8 update, hope fix is availible soon or ill have to revert back to 2022.7

I already reverted back .... need the device trackers on ios for to many automations 😜

@rchiileea
Copy link

same issue here on 2022.8 update, hope fix is availible soon or ill have to revert back to 2022.7

I already reverted back .... need the device trackers on ios for to many automations 😜

I removed the app, rebooted and reinstalled, intergration... then its really strange, get no devices showing or auth request.... :O

@TNTLarsn
Copy link
Contributor

TNTLarsn commented Aug 4, 2022

same issue here on 2022.8 update, hope fix is availible soon or ill have to revert back to 2022.7

I already reverted back .... need the device trackers on ios for to many automations 😜

I removed the app, rebooted and reinstalled, intergration... then its really strange, get no devices showing or auth request.... :O

https://www.home-assistant.io/integrations/icloud/#in-case-of-troubleshooting

In case of troubleshooting

Go into your Home Assistant configuration .storage folder and delete the icloud folder, then retry.

@damiano75
Copy link

same issue here on 2022.8 update, hope fix is availible soon or ill have to revert back to 2022.7

I already reverted back .... need the device trackers on ios for to many automations 😜

I removed the app, rebooted and reinstalled, intergration... then its really strange, get no devices showing or auth request.... :O

https://www.home-assistant.io/integrations/icloud/#in-case-of-troubleshooting

In case of troubleshooting

Go into your Home Assistant configuration .storage folder and delete the icloud folder, then retry.

It doesn't work, I removed the icloud folder and reloaded the integration, it created a new icloud folder but no devices and no auth request

@swampylee
Copy link

Same here. Tried all the usual removing of files and restarting. Now no sensors or entities are shown under the integration (2022.8)

@pjakab
Copy link

pjakab commented Aug 4, 2022

adding to follow - Same issue here

@Jens-Wymeersch
Copy link

same issue

@djcrawleravp
Copy link

following issue

@radzio
Copy link

radzio commented Aug 5, 2022

Same here :(

@Pierrodu21
Copy link

Same here :'( following issue too! If we can help by giving you more details, let us know!

@dlgoodr
Copy link

dlgoodr commented Aug 5, 2022

You don't need to comment 'me too!' just to receive updates. Please click the 'Subscribe' button to the right of the first comment and save us all the notifications.

image

@bkr1969
Copy link

bkr1969 commented Aug 5, 2022

Can we get some sort of feedback as to whether someone has looked into this and is working on it? A week of silence is deafening.

@mehhhhhhhhhhhhhhhhhhhhhhhhhh
Copy link
Author

My bet is that this integration is pretty much dead. The code owner hasn't addressed the constant iCloud sign-in emails, and now is silent on any potential fix for 2022.8. Personally, I've moved on to iCloud3, available via HACS. The setup docs are definitely overcomplicated, but I was able to get it functioning by reading through both the docs and sample config file. It might be worth checking out if you don't want to wait around for this integration to be fixed.

@bkr1969
Copy link

bkr1969 commented Aug 5, 2022

I tried that the other day but I couldn't figure out how to even start it and I'm really only using it for my batter levels on my phone and watch which I do not believe iCloud3 supports.
I'd be willing to give it another look if you could share your steps as to getting it working.

@JuhaFIN1
Copy link

JuhaFIN1 commented Aug 6, 2022

My bet is that this integration is pretty much dead. The code owner hasn't addressed the constant iCloud sign-in emails, and now is silent on any potential fix for 2022.8. Personally, I've moved on to iCloud3, available via HACS. The setup docs are definitely overcomplicated, but I was able to get it functioning by reading through both the docs and sample config file. It might be worth checking out if you don't want to wait around for this integration to be fixed.

I have icloud3 with HACS installed and its broken too now. Please share how you get it working.

@mehhhhhhhhhhhhhhhhhhhhhhhhhh
Copy link
Author

I have icloud3 with HACS installed and its broken too now. Please share how you get it working.

I don't know how to fix a broken instance, as this is the first time I've successfully used iCloud3. The issue I had when I tried setting it up previously was not getting a window to enter the 2FA code into. Turns out it was hiding in Home Assistant's "Notifications" section, but not displaying a notification badge. Clicking "Notifications" in the lower left corner of Home Assistant revealed that iCloud3 had a prompt to enter the 2FA code.

@rchiileea
Copy link

Icloud3 is what I switched to but no watch battery support available

@radzio
Copy link

radzio commented Aug 7, 2022

Still not working in Home Assistant 2022.8.2

@freirejc
Copy link

freirejc commented Aug 7, 2022

See my logs... The Integration is not creation any sensor / entity.
Home Assistant 2022.8.2

Logger: homeassistant.components.sensor
Source: components/icloud/sensor.py:31
Integration: Sensor (documentation, issues)
First occurred: 16:21:51 (2 occurrences)
Last logged: 16:24:03

Error while setting up icloud platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/icloud/sensor.py", line 31, in async_setup_entry
account.listeners.append(
AttributeError: 'IcloudAccount' object has no attribute 'listeners'
image

@DTTerastar
Copy link

DTTerastar commented Aug 7, 2022

I figured out listeners was indeed deleted from line 107 in icloud/account.py

Restart and it's working for me!

DTTerastar added a commit to DTTerastar/core that referenced this issue Aug 7, 2022
This just restores listeners deleted during a refactor by @epenet in home-assistant#75007
@DTTerastar DTTerastar mentioned this issue Aug 7, 2022
23 tasks
@JustAmply
Copy link

You are totally right!
In this commit the listeners have been removed (by mistake i assume)

Great find, @DTTerastar!

@morrisonpeter
Copy link

Can I ask a stupid question? If I wanted to change the "homeassistant/components/icloud/account.py" file to manually add the "self.listeners = []" line, where do I find this file in the HA OS filesystem?
I have HA OS 8.4 with multiple ways to edit the file (File Editor add on, Terminal add on, or Samba sharing) but I can't find where the Core integrations are stored even after reading the documentation.
I was successful fixing an integration (WebRTC Camera) after the July HA update this way (while waiting for the PR to be approved, the owner went on vacation) but HACS integration files are easy to find.
Or, is there a better way to do this with GitHub pull requests in HA directly? I know this PR hasn't been approved but curious if I can just copy/paste the commit number into HA (I know this is probably just wishful thinking and I'm really learning GitHub as I go).
Regardless, it would be nice to fix the python myself instead of waiting for testing/approval/update since it is such a simple fix for something essential in my setup. Perhaps you can tell me where the account.py file is located?

@mehhhhhhhhhhhhhhhhhhhhhhhhhh
Copy link
Author

@DTTerastar YOU ROCK. Now save us from the dreaded iCloud sign in emails! 😉

@djcrawleravp
Copy link

Updating the docker tag :2022.8 solves this?, I just updated my container but the same error appears

@swampylee
Copy link

I figured out listeners was indeed deleted from line 107 in icloud/account.py

Restart and it's working for me!

Thank you. Fixed it for me.

@epenet epenet mentioned this issue Aug 8, 2022
23 tasks
@freirejc
Copy link

freirejc commented Aug 8, 2022

I figured out listeners was indeed deleted from line 107 in icloud/account.py

Restart and it's working for me!

Sorry to be a quite noob... but how do I run these commands in proxmox instance? I'm running HAOSS Supervised

@lowey71
Copy link

lowey71 commented Aug 8, 2022

Sorry to be a quite noob... but how do I run these commands in proxmox instance?

Use add-on 'SSH and Web terminal'. Disable 'Protection Mode'. Run commands as above

@bkr1969
Copy link

bkr1969 commented Aug 8, 2022

How do I do this when not using docker? I'm on HA Blue (ODROID)

@epenet
Copy link
Contributor

epenet commented Aug 8, 2022

Note: the fix has been merged, and it will be available in 2022.8.3 patch release

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.