core: Sonos integration logs "Error doing job: Task exception was never retrieved"
The problem
Sonos integration MIGHT have a mild bug. I’m seeing some concerning exceptions.
Some details
- Aside from the log entries, I do not observe any ill effects, I’m reporting this just in case.
- Everything seems to be working reliably now that I’ve added an
advertise_addr(sonos is on one network, HA is dual-homed). - My system is quite large at 13 zone, and I needed to run the pre-2023.2 beta after adding the 13th zone (Thank you for adding support for larger systems!)
- My speakers are all assigned a static address, but I am using discovery.
- My speakers are spread across three access points.
- The exceptions appear around startup or integration reload, but do not seem to appear during normal operation. I see ~17 copies of it, for a system with 13 zones, and well over 20 speakers.
- I think these exceptions are new in either 2023.2.1 or 2023.2
Thank you for the changes to support larger systems. They came at the perfect moment.
What version of Home Assistant Core has the issue?
core-2023.2.1
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
Sonos
Link to integration documentation on our website
https://www.home-assistant.io/integrations/sonos
Diagnostics information
Will provide privately.
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2023-02-04 18:18:13.425 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sonos/__init__.py", line 409, in _async_handle_discovery_message
await self.async_subscribe_to_zone_updates(discovered_ip)
File "/usr/src/homeassistant/homeassistant/components/sonos/__init__.py", line 202, in async_subscribe_to_zone_updates
sub = await soco.zoneGroupTopology.subscribe()
File "/usr/local/lib/python3.10/site-packages/soco/events_asyncio.py", line 373, in _async_wrap_subscribe
await subscribe(requested_timeout, auto_renew)
File "/usr/local/lib/python3.10/site-packages/soco/events_asyncio.py", line 506, in _async_make_request
response = await self.event_listener.session.request(
AttributeError: 'NoneType' object has no attribute 'request'
This is repeated quite a few times (~17 times)
### Additional information
_No response_
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (8 by maintainers)
Apologies for dropping off, what might be called a “plumbing disaster” took priority.
The beta (and now the release) has indeed fixed this for me. Thanks @jjlawren !
The beta release looks to have worked for me. I’ll let you know if anything shows up in the logs - but so far so good!
Yep. You can add this to your configuration: