-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home Assistant tries to render the lovelace UI before lovelace_gen is loaded. Other custom components may fail, too. #23
Comments
HACS 1.9.0 failed occasionally on a restart, but HACS 1.10.0 now fails to load on every restart. |
@wklink - I made a one-line change to the HACS extension (which is shown in the linked ticket), and it seems to work around the restart problem for me. I also did the upgrade to 2021.1.2 and it still seems to be working. I don't know what appetite HACS has to make a change in the same fashion. Here's the change in HACS:
which just treat any/all exceptions from that call to |
thank you @lmamakos this works for me too... i'm in 2021.1.5, does anybody knows if this will be corrected in a future version. |
It looks like a fix was committed in the last day to HACS. I suppose I'll see how effective next time I do an upgrade. That issue was hacs/integration#1808 and links to the change that was made when the issue was closed. |
Is it possible this is what I'm running into here? HACs won't load because a card where I'm specifying an !include with a variable is undefined. |
It doesn't look like |
If you're using jinja2 templates in your lovelace_gen enhanced pages, funny business can ensue upon restarting Home Assistant because the front end tries to render the pages without lovelace_gen having been loaded. If you're using jinja2 templates, the ugly syntax can really piss off the YAML parser.
Best case, you get broken pages until you refresh the page after lovelace_gen is in effect.
A worse case is that HACS is broken. Yeah, really! I opened this issue on what I noticed. It seems that while HACS starts up, it calls
system_health_info()
which returns a long horrible traceback and ayaml.parser.ParserError
exception that is not caught. HACS only catches some other specific exception..Here's an excerpt of one of my YAML files that was choked on with the stock YAML loader:
I think the root cause here is that I'm not aware of a dependency capability that requires one custom component to be loaded before the next is started. If you're lucky, the ordering mostly works out for you. If you're not lucky, it seems to break more often.
I do not know where the right place for ultimate resolution is; in the mean time, I've manually patched my HACS custom component so things are back to normal. I wanted to raise the issue mostly for awareness so that others might not have to go chase ghosts that timing dependent..
The text was updated successfully, but these errors were encountered: