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
72.17k stars 30.2k forks source link

Something is blocking Home Assistant from wrapping up the start up phase #94559

Closed riddledaxis closed 1 year ago

riddledaxis commented 1 year ago

The problem

I upgraded to core-2023.6.1 and it broke some of my integrations.

I restored my HA backup for core-2023.5.4 and now I am getting this issue.

In my log I get this "Something is blocking Home Assistant from wrapping up the start up phase. We're going to continue anyway. Please report the following info at https://github.com/home-assistant/core/issues"

The issue is causing the following integrations to fail to setup:

Alexa Media Player Google Assistant SDK Google Nest Nest Protect

Please advise how I can resolve this issue.

Thanks

Paul

What version of Home Assistant Core has the issue?

core-2023.5.4

What was the last working version of Home Assistant Core?

core-2023.5.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Assistant Core

Link to integration documentation on our website

No response

Diagnostics information

System Information

version core-2023.5.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.11
os_name Linux
os_version 6.1.29
arch x86_64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | failed to load: timeout GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.32.1 Stage | running Available Repositories | 1350 Downloaded Repositories | 10 HACS Data | failed to load: timeout
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | failed to load: timeout can_reach_cloud_auth | failed to load: timeout can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 10.2 -- | -- update_channel | stable supervisor_version | supervisor-2023.06.1 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 30.8 GB disk_used | 6.3 GB healthy | true supported | true board | ova supervisor_api | ok version_api | failed to load: timeout installed_addons | Cloudflared (4.1.7), Z-Wave JS UI (1.13.3), Mosquitto broker (6.2.1), Zigbee2MQTT (1.31.2-1), Samba share (10.0.2), Studio Code Server (5.6.1), Log Viewer (0.15.1), Terminal & SSH (9.7.1), Home Assistant Google Drive Backup (0.110.4)
Dashboards dashboards | 3 -- | -- resources | 3 views | 10 mode | storage
Recorder oldest_recorder_run | 30 May 2023 at 15:51 -- | -- current_recorder_run | 13 June 2023 at 20:02 estimated_db_size | 46.71 MiB database_engine | sqlite database_version | 3.40.1

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Something is blocking Home Assistant from wrapping up the start up phase. We're going to continue anyway. Please report the following info at https://github.com/home-assistant/core/issues: sensor.template, button.mqtt, media_player.webostv, life360, file_upload, energy, camera.mqtt, text.mqtt, number, nest, number.mqtt, humidifier.mqtt, hue, notify.webostv, button.google_assistant, script, timer, media_player, cast, device_automation, group, device_tracker.mobile_app, device_tracker.mqtt, lock.mqtt, update.hassio, stream, persistent_notification, input_text, siren.mqtt, sensor.hue, scene.homeassistant, http, binary_sensor.hassio, zeroconf, harmony, map, owntracks, input_datetime, tag, vacuum.mqtt, ssdp, sensor.mobile_app, switch, application_credentials, input_select, logger, counter, camera.aarlo, media_source, light, scene.mqtt, alexa_media, binary_sensor.mobile_app, hassio, sensor.time_date, scene, sensor.sonos, websocket_api, auth, remote.harmony, switch.wemo, sonos, update, media_player.dlna_dmr, google_assistant_sdk, tts.google_translate, fan, usb, homeassistant, mqtt, climate, binary_sensor.hue, notify.mobile_app, update.hacs, my, nest_protect, sensor.dwains_dashboard, assist_pipeline, recorder, homeassistant_alerts, sun, sensor.sun, cover.mqtt, template, alarm_control_panel.mqtt, dwains_dashboard, hardware, lock, conversation, scene.hue, switch.harmony, webostv, light.mqtt, search, binary_sensor, device_tracker.owntracks, lovelace, select, sensor.energy, person, select.mqtt, number.sonos, automation, camera, device_tracker.life360, network, frontend, sensor.wemo, cover, siren, switch.mqtt, button, humidifier, alarm_control_panel, analytics, sensor.mqtt, zone, switch.hue, sensor.group, aarlo, notify, mobile_app, diagnostics, schedule, webhook, hacs, default_config, text, api, binary_sensor.mqtt, trace, cloud, image_upload, fan.mqtt, dlna_dmr, alarm_control_panel.aarlo, switch.sonos, light.hue, input_boolean, notify.google_assistant_sdk, tts, sensor, blueprint, sensor.hacs, sensor.aarlo, media_player.sonos, google_assistant, light.group, input_number, logbook, wemo, radio_browser, system_health, select.harmony, system_log, dhcp, vacuum, update.mqtt, media_player.cast, history, device_tracker, switch.aarlo, repairs, stt, climate.mqtt, binary_sensor.sonos, onboarding, ffmpeg, binary_sensor.aarlo, sensor.hassio, bluetooth, remote, input_button, config

2023-06-13 20:08:03.339 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, alexa_media, device_tracker, device_tracker.icloud3, google_assistant_sdk, nest
2023-06-13 20:08:16.772 ERROR (MainThread) [homeassistant.setup] Setup of device_tracker is taking longer than 300 seconds. Startup will proceed without waiting any longer
2023-06-13 20:08:16.782 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of ios. Setup failed for dependencies: device_tracker
2023-06-13 20:08:16.783 ERROR (MainThread) [homeassistant.setup] Setup failed for ios: (DependencyError(...), 'Could not setup dependencies: device_tracker')
2023-06-13 20:08:21.214 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 188.166.184.253 (188.166.184.253). Requested URL: '/media/wp-includes/wlwmanifest.xml'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36)
2023-06-13 20:08:26.991 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Google Assistant SDK for google_assistant_sdk
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/google_assistant_sdk/__init__.py", line 66, in async_setup_entry
    await session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 499, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 92, in async_refresh_token
    new_token = await self._async_refresh_token(token)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 182, in _async_refresh_token
    new_token = await self._token_request(
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 201, in _token_request
    resp = await session.post(self.token_url, data=data)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 467, in _request
    with timer:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
2023-06-13 20:08:27.007 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7f0c1e840f70>,), {'cookies': {'at-main': <Morsel: at-main=Atza|IwEBIDujjGC0jjxnoZ5sVmhV4Gmz-vrD6U96ivbEstjbpUhmp1VaiHy8LUmrWIYSawMSReeDGG6YUD6gitaKBJQ96sR7DrKlHPx7x2t7yssVc2eplxhOKVQ2ApXM0BIEr-_dZna503K5iZ4ZUMDubazm_QuqPm9KiIGcsCa8T_c8d3JMH8AdXZc0F0sIViJZzqunqk3PlEo0aQRE7f_8URLuOzKvSlHr0nfgtm4Dzf9DRRkwl_3DuKrjJd0XgbfiMFw-S8MQ_zQCFiv6UG_Qqru5GUq8g2khqDJZbJtFeTTZ1_UvWA>, 'lc-main': <Morsel: lc-main=en_GB>, 'sess-at-main': <Morsel: sess-at-main="\"w5yiX6/4gjzG7l+siVNxytNHoA7Zn1Tf9ELt+NT+BKU=\"">, 'session-id': <Morsel: session-id=261-5117903-6333763>, 'session-id-time': <Morsel: session-id-time=2316515164l>, 'session-token': <Morsel: session-token=Qt3ppZbK6yY0smo/YY9Fk1nocI/a8Bu0aaBPv7lsOAXpnjF9OMauFpVQJNssqEyqjhJxcZa1Yr3AuP4tjRye0RugKHqV1QtZQ58CBL3bfwYakMe8NCPnb78JSEOO8cWUgtYdEciamIroL8M9U0i4d9OQxQL3H8LcmfB9uFEpzgNL5qO7RrXiDatXds5Y7ZmuzIE0gkluNpRXaSvOD4S/4vyJEJjMEz2q46EUm5Y2hde6dAOXJGoM/n35utCO3mph>, 'ubid-main': <Morsel: ubid-main=131-3924498-2095369>, 'x-main': <Morsel: x-main="\"engU2MsRx@tXAxX8DpdilOHKv@rkG15h\"">, 'csrf': <Morsel: csrf=-737437483>, 'ubid-acbuk': <Morsel: ubid-acbuk=260-3058799-2421922>, 'x-acbuk': <Morsel: x-acbuk="dv4hCm?qilyuYn@5rnRap8CYfG7PdtlI">, 'at-acbuk': <Morsel: at-acbuk=Atza|IwEBIPw4yuXavE6ioqsj4pTqGDLZBCeA_gIbn-eXEoUsqZyNkzhea5RVJP8l9JxHCULp3y-DsKTWXmCH7pAOHqscl2QPLCsRIoNtxaCudl61OrJVqWL1XdlPUlyvaFBpBvYkLZ93bvCwtFrTTxBjD8WB8M_rDjGVRm0BHiBI8gt2Sgi1OFUQgTcvv1OwdLnBSB-omMe1vkOZ47K8Su1pPV-BFswlqpuUEUrg4tyC2y8UX7xtzT8Zh6L1ytzGYdCScm8GthKvow_J-IGXSp1DUonknTfv2v9tIzjZk6lSR2k61yfbYcAFEcAEv_gZaljOJ5DzQfw6VeH-h571LeQDJMkf9msUumjiPjDecy8wtTwbcrwqoHRJYDGOVMbBIV78zZ1JW8A8pUba1I67wfwosVqiQ60M>, 'sess-at-acbuk': <Morsel: sess-at-acbuk="07dTMfHSru0fMDY5YRRWcmOhdMbav3xQA91Tx6SnR6Y=">}}): An error occurred accessing AlexaAPI: An exception of type TimeoutError occurred. Arguments:
()
2023-06-13 20:08:27.015 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry pj73@me.com - amazon.co.uk for alexa_media
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/alexa_media/__init__.py", line 326, in async_setup_entry
    await login.login(cookies=await login.load_cookie())
  File "/usr/local/lib/python3.10/site-packages/alexapy/helpers.py", line 137, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexalogin.py", line 583, in login
    if await self.test_loggedin(cookies):
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexalogin.py", line 462, in test_loggedin
    await self.exchange_token_for_cookies()
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexalogin.py", line 929, in exchange_token_for_cookies
    response = await self._session.post(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 467, in _request
    with timer:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
2023-06-13 20:09:03.493 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, device_tracker.icloud3, nest
2023-06-13 20:10:58.380 INFO (Wemo Events Thread) [pywemo.subscribe] Resubscribe for <Subscription basicevent "Outside Lights">
2023-06-13 20:12:48.994 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home for nest
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/nest/__init__.py", line 213, in async_setup_entry
    await subscriber.start_async()
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/google_nest_subscriber.py", line 415, in start_async
    await self._subscriber_factory.async_new_subscriber(
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/google_nest_subscriber.py", line 260, in async_new_subscriber
    return await loop.run_in_executor(
asyncio.exceptions.CancelledError
2023-06-13 20:12:49.004 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nest Protect for nest_protect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/nest_protect/__init__.py", line 85, in async_setup_entry
    nest = await client.authenticate(auth.access_token)
  File "/config/custom_components/nest_protect/pynest/client.py", line 167, in authenticate
    async with self.session.post(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
    return await fut
asyncio.exceptions.CancelledError
2023-06-13 20:12:49.065 INFO (MainThread) [slixmpp.xmlstream.xmlstream] connection_lost: (None,)
2023-06-13 20:12:49.067 INFO (MainThread) [slixmpp.xmlstream.xmlstream] connection_lost: (None,)
2023-06-13 20:12:49.074 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 676, in ping
    await self._send_frame(message, WSMsgType.PING)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 653, in _send_frame
    self._write(header + message)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_websocket.py", line 663, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
2023-06-13 20:12:49.257 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [139689779573136] Connection closed by client
2023-06-13 20:12:49.295 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward
2023-06-13 20:12:49.313 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/http.py", line 53, in get
    return await WebSocketHandler(request.app["hass"], request).async_handle()
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/http.py", line 213, in async_handle
    await wsock.prepare(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_ws.py", line 138, in prepare
    payload_writer = await super().prepare(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_response.py", line 421, in prepare
    return await self._start(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_response.py", line 429, in _start
    await self._write_headers()
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_response.py", line 502, in _write_headers
    await writer.write_headers(status_line, self._headers)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/http_writer.py", line 75, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

2023-06-13 20:13:35.213 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, device_tracker.icloud3, nest
2023-06-13 20:14:35.376 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, device_tracker.icloud3, nest
2023-06-13 20:14:43.396 INFO (Wemo Events Thread) [pywemo.subscribe] Resubscribe for <Subscription basicevent "Outside Lights">
2023-06-13 20:15:33.938 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nest Protect for nest_protect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/nest_protect/__init__.py", line 78, in async_setup_entry
    auth = await client.get_access_token_from_cookies(issue_token, cookies)
  File "/config/custom_components/nest_protect/pynest/client.py", line 142, in get_access_token_from_cookies
    async with self.session.get(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
    return await fut
asyncio.exceptions.CancelledError
2023-06-13 20:15:35.469 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, device_tracker.icloud3, nest
2023-06-13 20:16:35.566 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, device_tracker.icloud3, nest
2023-06-13 20:17:35.665 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: nest_protect, device_tracker.icloud3, nest

2023-06-13 20:26:31.464 ERROR (MainThread) [homeassistant.components.life360] Error fetching life360 (pj73@outlook.com) data: ClientResponseError: 502, message='Bad Gateway', url=URL('https://api.life360.com/v3/circles/REDACTED/places')

Additional information

No response

riddledaxis commented 1 year ago

It looks like this was fixed with 2023.6.2