Skip to content
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

snips can not be setup after update to core-2023.5.0b2 #92236

Closed
diplix opened this issue Apr 29, 2023 · 5 comments · Fixed by #92296
Closed

snips can not be setup after update to core-2023.5.0b2 #92236

diplix opened this issue Apr 29, 2023 · 5 comments · Fixed by #92296

Comments

@diplix
Copy link
Contributor

diplix commented Apr 29, 2023

The problem

After installing the current beta (.0b2) snips can not be set up.

The following integrations and platforms could not be set up:
 •	snips (Show logs)
Please check your config and logs.

It was working fine in 2023.4.x
A similar problem due to timing issues while staring up occured a while ago in #81431

What version of Home Assistant Core has the issue?

core-2023.5.0b2

What was the last working version of Home Assistant Core?

core-2023.4.6

What type of installation are you running?

Home Assistant Core

Integration causing the issue

snips, mqtt

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

snips:
  probability_threshold: 0.089
  site_ids: ivanka, ivan, juri

Anything in the logs that might be useful for us?

Logger: homeassistant.setup
Source: components/mqtt/util.py:179
First occurred: 11:54:18 (1 occurrences)
Last logged: 11:54:18

Error during setup of component snips
Traceback (most recent call last):
  File "/home/homeassistant/homeassistant_p3.10/lib/python3.10/site-packages/homeassistant/setup.py", line 257, in _async_setup_component
    result = await task
  File "/home/homeassistant/homeassistant_p3.10/lib/python3.10/site-packages/homeassistant/components/snips/__init__.py", line 162, in async_setup
    await mqtt.async_subscribe(hass, INTENT_TOPIC, message_received)
  File "/home/homeassistant/homeassistant_p3.10/lib/python3.10/site-packages/homeassistant/components/mqtt/client.py", line 173, in async_subscribe
    mqtt_data = get_mqtt_data(hass)
  File "/home/homeassistant/homeassistant_p3.10/lib/python3.10/site-packages/homeassistant/components/mqtt/util.py", line 179, in get_mqtt_data
    mqtt_data = hass.data[DATA_MQTT]
KeyError: 'mqtt'

Additional information

No response

@home-assistant
Copy link

@mib1185 mib1185 added this to the 2023.5.0 milestone Apr 29, 2023
@diplix
Copy link
Contributor Author

diplix commented Apr 30, 2023

since i could not reproduce this on a fresh (ish) install, i tried to revert #91790 which solved my problem. re-enabling the check let’s the snips integration be setup on my production instance again without error with core-2023.05.0b4

i have quiet a lot of mqtt entities (~954) and the the mqtt integration takes about 23 seconds to start up, according to home assistant. so i guess this might be an edge case, where it’s still not safe to remove the snips-integration check for MQTT availability and waiting for mqtt to become available under some circumstances.

@bdraco
Copy link
Member

bdraco commented Apr 30, 2023

cc @jbouwh

@jbouwh
Copy link
Contributor

jbouwh commented Apr 30, 2023

@diplix A fix is provided, so with 2023.5.0 I expect this bug to be resolved. I opened #92297 to trigger further investigation. May be you can help us a bit to understand why the snips setup stopped waiting for mqtt. May be you have some other stuff that takes some time to startup and causes the snips setup to be started regardless of the state of mqtt. Please log any comments at #92297

@diplix
Copy link
Contributor Author

diplix commented Apr 30, 2023

thanks for looking into this. i left a description regarding startup times of my HA instance over at #92297 (comment).

@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants