-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
No access to web UI after Hass restart or host reboot #17282
Comments
@layanto commented on Oct 9, 2018, 12:09 AM UTC: configuration.yaml:
|
@layanto commented on Oct 9, 2018, 1:06 AM UTC: Running hassio ha start returns ERROR Deleting .storage/core.config_entries and reboot host solved the problem. But I imagine this will occur again when Chromecast gets discovered again. |
@layanto commented on Oct 9, 2018, 11:07 AM UTC: I think it is caused by this software on my PC emulating Google cast https://www.airserver.com/PC |
@pvizeli commented on Oct 9, 2018, 3:01 PM UTC: You can remove |
Yes that would probably be because of the cast platform. The problem is that we're trying to connect to the chromecast here: but if the connecting takes forever (could happen for many reasons), we And if I understand correctly, home assistant waits for the entire task queue to clear before starting up. As this one chromecast connection task is never finished, home assistant doesn't start up. There was an attempt to limit the amount of time the connection could take before giving up (#16471), but that had other consequences that resulted in issues for some other cast users. Thinking about this again, I guess the easiest solution would be to delay connecting to chromecast until after home assistant is started up already. But maybe my conclusion in the paragraph before is also wrong. @balloob I know there is |
The bug here is that any connection that we make should have a timeout. So we should add a timeout here. Adding it after start is not preferred, as it triggers automations. Here is how to detect if we have started or not: |
Last time I try to add timeout on this function failed miserable, remembered? Alternative solution is only add timeout when we are in the startup phase, but I am not sure if it will affect the device turned on after the startup. if self.hass.state == CoreState.not_running:
tries = 1
else:
tries = None
chromecast = await self.hass.async_add_job(
pychromecast._get_chromecast_from_host, (
cast_info.host, cast_info.port, cast_info.uuid,
cast_info.model_name, cast_info.friendly_name
), tries) Since I already returned my chromecast, I would not touch this again 😃 |
I disabled AirServer from emulating Google cast and no longer has this problem. |
I've had this for awhile now too, someone mentioned it to me before but if you delete the config/.storage/core.config_entries file and then reboot, HA comes back up. You'll have to rediscover the chromecasts again and it will lock up every reboot but if you have Samba/SSH working it's easier than flashing a new Hassio image. |
I´m having this issue now. Some errors in logs about Chromecast prior to reboot. After reboot I cannot connect to frontend and even SSH / Samba are down. I need to reflash again. This is pretty frustrating. My setup is RPI3 and I have two Chromecasts, This is a second reflash in one week. My Hassio just doesn´t start after reboot. |
@balloob Why does pychromecast need to do blocking IO in SocketClient constructor, can't that just as well be handled by the normal (re)connect handling? |
@layanto, @jpmii, @reprz Can you please give the fix in #21565 a try? Please note you also need to patch pychromecast with home-assistant-libs/pychromecast#271 |
@emontnemery As I said in #21565, that fix worked for me. I didn't even have to patch pychromecast! |
@layanto commented on Oct 8, 2018, 10:47 PM UTC:
Doesn't happen every Hass restart or host reboot but happened a few times in the last few days. The only way I can fix is by reinstalling Hassio and restore snapshot. I have only started using Hassio for a few days and already had to reinstall at least 5 times. When I cannot connect to web UI, I can still connect via SSH or samba.
hassio ha logs:
This issue was moved by pvizeli from home-assistant/hassio#746.
The text was updated successfully, but these errors were encountered: