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.96k stars 29.04k forks source link

2024.6.2 installation crashes #119469

Closed henrikhermansen closed 5 days ago

henrikhermansen commented 1 month ago

The problem

I am currently running HA Core 2024.6.1, and multiple attempts to upgrade to 2024.6.2 has failed. In my Supervisor logs I don't get much useful information, I just get this:

2024-06-12 11:01:43.050 ERROR (MainThread) [supervisor.homeassistant.core] Home Assistant has crashed!
2024-06-12 11:01:43.051 CRITICAL (MainThread) [supervisor.homeassistant.core] HomeAssistant update failed -> rollback!

Is there any way I could get more information about why the upgrade fails?

What version of Home Assistant Core has the issue?

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

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

In the home-assistant-rollback.log this is the last entry, no idea if it is related, but it's possible. I do have some Shelly devices, and there is a Shelly-related change in 2024.6.2 Bump aioshelly to 10.0.1 ([@thecode](https://github.com/thecode) - [#119123](https://github.com/home-assistant/core/pull/119123))

2024-06-12 11:01:31.956 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 345, in call_rpc
    return await self._wsrpc.call(method, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/wsrpc.py", line 414, in call
    resp = await self._rpc_call(method, params, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/wsrpc.py", line 447, in _rpc_call
    resp = await future
           ^^^^^^^^^^^^
aioshelly.exceptions.DeviceConnectionError: <aioshelly.rpc_device.wsrpc.RPCCall object at 0x7ff7f48c57e0>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 161, in _handle_ha_stop
    await self.shutdown()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 701, in shutdown
    await async_stop_scanner(self.device)
  File "/usr/local/lib/python3.12/site-packages/aioshelly/ble/__init__.py", line 34, in async_stop_scanner
    script_name_to_id = await _async_get_scripts_by_name(device)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/ble/__init__.py", line 28, in _async_get_scripts_by_name
    scripts = await device.script_list()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 256, in script_list
    data = await self.call_rpc("Script.List")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 351, in call_rpc
    raise DeviceConnectionError from err
aioshelly.exceptions.DeviceConnectionError
2024-06-12 11:01:31.961 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 345, in call_rpc
    return await self._wsrpc.call(method, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/wsrpc.py", line 414, in call
    resp = await self._rpc_call(method, params, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/wsrpc.py", line 447, in _rpc_call
    resp = await future
           ^^^^^^^^^^^^
aioshelly.exceptions.DeviceConnectionError: <aioshelly.rpc_device.wsrpc.RPCCall object at 0x7ff7f48c5c60>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 161, in _handle_ha_stop
    await self.shutdown()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 701, in shutdown
    await async_stop_scanner(self.device)
  File "/usr/local/lib/python3.12/site-packages/aioshelly/ble/__init__.py", line 34, in async_stop_scanner
    script_name_to_id = await _async_get_scripts_by_name(device)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/ble/__init__.py", line 28, in _async_get_scripts_by_name
    scripts = await device.script_list()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 256, in script_list
    data = await self.call_rpc("Script.List")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 351, in call_rpc
    raise DeviceConnectionError from err
aioshelly.exceptions.DeviceConnectionError

Additional information

No response

nightcrawler2164 commented 1 month ago

+1 to this issue. I've temporarily rolled back to 2024.6.1, and so far it seems to be holding fine. If it helps, I have Shelly devices as well, and noticed the same error messages in my logs as well

bdraco commented 1 month ago

Please take a look at https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441 as it might help track down the issue

henrikhermansen commented 3 weeks ago

I was able to install 2024.6.3 today. Didn't notice anything in the changelog that would indicate it should work, but I guess someone has done something. How does it look for you, @nightcrawler2164 ?

nightcrawler2164 commented 3 weeks ago

I've been putting off installing 2024.6.3 but I may give it a shot in my test server and see how it goes. Will update back here.

issue-triage-workflows[bot] commented 1 week ago

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.