core: Home Assistant boot process gets stuck while loading Rainforest RAVEn integration.
The problem
Home Assistant got stuck in the startup process while loading the Rainforest RAVEn integration. While it was stuck, I wasn’t able to access the Overview dashboard because Home Assistant said it was still booting up (I could still navigate to menus and custom dashboards).
Sequence of events:
- Updated Core, then rebooted
- Updated some addons (Samba, ssh, whisper) and Supervisor, then rebooted
- Was unable to navigate to my Home Assistant interface through my web browser. So I rebooted the HA VM through Proxmox
- Home Assistant interface was reachable (I could navigate the menus and custom dashboards, but not the Overview dashboard) but the following message popup in the UI would not go away:
Starting Rainforest RAVEn, not everything will be available until it is finished.
- Unplugged my Rainforest EMU-2 USB cable, waited a few seconds, plugged it in again.
- The “Starting Rainforest RAVEn” message went away and Home Assistant appeared to be running normally
What version of Home Assistant Core has the issue?
core-2024.3.1
What was the last working version of Home Assistant Core?
core-2024.3.0
What type of installation are you running?
Home Assistant OS
Integration causing the issue
rainforest_raven
Link to integration documentation on our website
https://www.home-assistant.io/integrations/rainforest_raven/
Diagnostics information
config_entry-rainforest_raven-2a01a9ec98f5f6849b766186260f7c24(1).json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
While bootup was "stuck" there were many repeats of this message:
...
2024-03-14 16:55:11.210 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: rainforest_raven
...
------log below occurs around the time I unplugged the EMU-2 USB cable and bootup became "unstuck"------
2024-03-14 16:58:11.355 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: rainforest_raven
2024-03-14 16:58:18.859 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Living Room TV at 192.168.1.45
2024-03-14 16:58:18.993 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage.
2024-03-14 16:58:22.254 ERROR (MainThread) [homeassistant] Error doing job: Fatal write error on serial transport
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 621, in write
n = os.write(self.fd, d)
^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 5] I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/serial_asyncio/__init__.py", line 261, in _write_ready
n = self._serial.write(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 655, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: [Errno 5] I/O error
2024-03-14 16:58:22.292 WARNING (MainThread) [homeassistant.helpers.system_info] No Home Assistant Supervisor info available
2024-03-14 16:58:34.998 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Living Room TV at 192.168.1.45
2024-03-14 16:58:35.134 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage.
2024-03-14 16:58:51.141 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Living Room TV at 192.168.1.45
2024-03-14 16:58:51.277 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage.
2024-03-14 16:59:07.285 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Living Room TV at 192.168.1.45
2024-03-14 16:59:07.415 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage.
2024-03-14 16:59:23.420 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from Living Room TV at 192.168.1.45
2024-03-14 16:59:23.553 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage.
Additional information
Even while the Rainforest RAVEn integration is running normally, there are frequent occurrences of “Unavailable” states. This causes the history graph to have many gaps, and dashboards showing the EMU-2 status will often show “Unavailable” instead of the last known value.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 30 (6 by maintainers)
Nope, I hadn’t yet updated to 2024.4.0 when it happened. (I am currently updating now)
Oh, and I haven’t really rebooted enough times to see if the boot process still gets stuck, but based on your explanation, I doubt I will encounter it again.
In almost two days of running the latest update, I haven’t had any gaps in my history! https://github.com/home-assistant/core/issues/113539 is still occurring however. I will add more comments over on that issue.
EDIT: There were actually four gaps. See a couple of comments down.
Ah, I can see from the diagnostics that it appears in the VM as a USB device.
There were some handle leaks in 2024.2.0-2024.3.0 that I believe were causing a multitude of problems, including the gaps in the history. From what I can tell, the leaked handles would accumulate to the point where Home Assistant was no longer able to maintain a connection at all, resulting in bugs like #111886.
I also observed some problems in my VM after letting 2024.3.0 run to the point where the handle leaks saturated and needed to disconnect and reconnect the device, though I haven’t been able to reproduce the problem now that the handle leaks are fixed. Please keep me updated with any changes in behavior.