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
69.25k stars 28.47k forks source link

Yamaha MusicCast - Error on HA Start - Error doing job: Task exception was never retrieved #117228

Open AnthonyBe opened 3 weeks ago

AnthonyBe commented 3 weeks ago

The problem

On every start of HA I get the following error logged once to my HA log. This does not appear to be impacting functionality. Possibly related to this old issue? https://github.com/home-assistant/core/issues/86672 Sorry, can't recall when this first started.

2024-05-11 12:07:21.409 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 105, in _async_start
    await gather_with_limited_concurrency(FLOW_INIT_LIMIT, *init_coros)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 109, in gather_with_limited_concurrency
    return await gather(
           ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 107, in sem_task
    return await task
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1215, in async_init
    flow, result = await self._async_init(flow_id, handler, context, data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1245, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/yamaha_musiccast/config_flow.py", line 90, in async_step_ssdp
    if not await MusicCastDevice.check_yamaha_ssdp(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiomusiccast/musiccast_device.py", line 87, in check_yamaha_ssdp
    res = await client.get(location)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 608, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 976, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 640, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

What version of Home Assistant Core has the issue?

core-2024.5.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

MusicCast

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

After start-up, everything appears to be working.
Debug log shows no errors:
2024-05-11 13:01:05.903 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching netusb...
2024-05-11 13:01:05.912 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching tuner...
2024-05-11 13:01:05.916 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching Distribution data...
2024-05-11 13:01:05.920 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching zone main...
2024-05-11 13:01:06.136 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching zone zone2...
2024-05-11 13:01:06.140 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching func status...
2024-05-11 13:01:06.180 DEBUG (MainThread) [homeassistant.components.yamaha_musiccast] Finished fetching yamaha_musiccast data in 0.331 seconds (success: True)
2024-05-11 13:01:06.856 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching netusb...
2024-05-11 13:01:06.880 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching Distribution data...
2024-05-11 13:01:06.892 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching zone main...
2024-05-11 13:01:06.905 DEBUG (MainThread) [aiomusiccast.musiccast_device] Fetching func status...
2024-05-11 13:01:06.917 DEBUG (MainThread) [homeassistant.components.yamaha_musiccast] Finished fetching yamaha_musiccast data in 0.087 seconds (success: True)

Additional information

No response

home-assistant[bot] commented 3 weeks ago

Hey there @vigonotion, @micha91, mind taking a look at this issue as it has been labeled with an integration (yamaha_musiccast) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `yamaha_musiccast` 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 yamaha_musiccast` 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)


yamaha_musiccast documentation yamaha_musiccast source (message by IssueLinks)

sephrioth commented 3 weeks ago

Bump, I have the same issue recently, the error sometimes pops up when I operate the MusicCast device from HA. The device is connected by cable, so the connection is very reliable.