Load infinite on home page

Hi,

I regularly have HA stuck on the loading of the home (and other page as well).
I must restart Home assistant service so that tt works correctly :unamused:

Your translation service seems to have broken. Could you try rephrasing?

Anybody have idea why my HA stuck ? :confused:
I see log and development console and I don’t find anything wrong.

Try ctrl (or command on mac) + shift + r.

Already try, it’s not a cache problem.
When HA is in this state, nothing works anymore :confused:

I have Node-RED, websocket => KO
HMI => KO
Automatisation => KO
Generic Thermostat => KO
…

And I have no particular error in log :sob:

Error log when service is KO :

I have the impression that the problem occurs when one of the google home is unreachable …

Hello, it looks like my Home Assistant is going into error after this stack trace :

 2021-01-26 21:37:20 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
 Traceback (most recent call last):                                                                       
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/helpers.py", line 59, in async_call_api      
     result = await session.get(url, params=params or {}, headers=_headers)                          
   File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request                 
     conn = await self._connector.connect(                                                                
   File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect                                                                                                                          
     proto = await self._create_connection(req, traces, timeout)                                                                                                                                                     
   File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _create_connection                                                                                                               
     _, proto = await self._create_direct_connection(req, traces, timeout)                                                                                                                                           
   File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection                                                                                                        
     hosts = await asyncio.shield(host_resolved)                                                          
 asyncio.exceptions.CancelledError                                                                                                                                                                                   
                                                                                                          
 During handling of the above exception, another exception occurred:                              
  
 Traceback (most recent call last):
   File "/config/custom_components/hacs/hacsbase/hacs.py", line 282, in recurring_tasks_installed
     await self.handle_critical_repositories()
   File "/config/custom_components/hacs/hacsbase/hacs.py", line 194, in handle_critical_repositories
     critical = await self.data_repo.get_contents("critical")
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/objects/repository/__init__.py", line 109, in get_contents
     response = await self.client.get(endpoint=_endpoint, params=_params)
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/client.py", line 37, in get
     response = await async_call_api(
   File "/usr/local/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
     ret = await target(*args, **kwargs)
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/helpers.py", line 101, in async_call_api
     raise AIOGitHubAPIException(response.data)
   File "/usr/local/lib/python3.8/site-packages/async_timeout/__init__.py", line 55, in __aexit__
     self._do_exit(exc_type)
   File "/usr/local/lib/python3.8/site-packages/async_timeout/__init__.py", line 92, in _do_exit
     raise asyncio.TimeoutError
 asyncio.exceptions.TimeoutError

I also get this kind of error when my HA is out of service :

 2021-01-27 00:28:46 ERROR (MainThread) [custom_components.hacs] Error trying to serve lovelace-auto-entities/auto-entities.js                                                                                       
 Traceback (most recent call last):                                                                                                                                                                                  
   File "/config/custom_components/hacs/webresponses/category.py", line 23, in async_serve_category_file                                                                                                             
     return await async_serve_static_file_with_cache_header(                                                                                                                                                         
   File "/config/custom_components/hacs/webresponses/category.py", line 35, in async_serve_static_file_with_cache_header                                                                                             
     if not await async_path_exsist(servefile):                                                                                                                                                                      
   File "/config/custom_components/hacs/helpers/functions/path_exsist.py", line 13, in async_path_exsist                                                                                                             
     return await hass.async_add_executor_job(path_exsist, path)                                                                                                                                                     
 asyncio.exceptions.CancelledError                                                                                                                                                                                   
 2021-01-27 00:28:46 ERROR (MainThread) [custom_components.hacs] Error trying to serve atomic-calendar-revive/atomic-calendar-revive.js                                                                              
 Traceback (most recent call last):                                                                                                                                                                                  
   File "/config/custom_components/hacs/webresponses/category.py", line 23, in async_serve_category_file                                                                                                             
     return await async_serve_static_file_with_cache_header(                                                                                                                                                         
   File "/config/custom_components/hacs/webresponses/category.py", line 35, in async_serve_static_file_with_cache_header                                                                                             
     if not await async_path_exsist(servefile):                                                                                                                                                                      
   File "/config/custom_components/hacs/helpers/functions/path_exsist.py", line 13, in async_path_exsist                                                                                                             
     return await hass.async_add_executor_job(path_exsist, path)                                                                                                                                                     
 asyncio.exceptions.CancelledError

I have the impression that for some unknown reason, all HACS integration times out

Looks like a custom plugin might be the problem.

When I am in this state, all custom_components return this error.
How do I find the problematic custom_components ?

I mean plugins, like custom cards, not components.

I deleted all unused resources that I had included in testing.
I hope it was one of them that generated the concern: /

- url: /hacsfiles/lovelace-card-mod/card-mod.js
  type: module
- url: /hacsfiles/lovelace-layout-card/layout-card.js
  type: module
- url: /hacsfiles/vertical-stack-in-card/vertical-stack-in-card.js
  type: module
- url: /hacsfiles/simple-thermostat/simple-thermostat.js
  type: module
- url: /hacsfiles/button-card/button-card.js
  type: module
- url: /hacsfiles/rgb-light-card/card.js
  type: js
- url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
  type: js
- url: /hacsfiles/garbage-collection-card/garbage-collection-card.js
  type: js
- url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js
  type: module
- url: /hacsfiles/lovelace-auto-entities/auto-entities.js
  type: module
- url: /hacsfiles/stack-in-card/stack-in-card.js
  type: module
- url: /hacsfiles/custom-sidebar/custom-sidebar.js
  type: module
- url: /hacsfiles/lovelace-meteofrance-weather-card/meteofrance-weather-card.js
  type: module
- url: /hacsfiles/atomic-calendar-revive/atomic-calendar-revive.js
  type: module

## unused ressources
#- url: /hacsfiles/lovelace-gap-card/gap-card.js
#  type: module
#- url: /hacsfiles/lovelace-dummy-entity-row/dummy-entity-row.js
#  type: module
#- url: /hacsfiles/button-text-card/button-text-card.js
#  type: module
#- url: /hacsfiles/weather-card/weather-card.js
#  type: js
#- url: /hacsfiles/lovelace-card-templater/lovelace-card-templater.js
#  type: js
#- url: /hacsfiles/entity-attributes-card/entity-attributes-card.js
#  type: js

This means that anything in your resources could cause this problem.

Well this will be 3 days since I stopped the automatic launch of my google homes for the lullaby of my children (spotify), and I have no more crashes…

It seems that the concern comes from the Spotcast integration :confused:

Good since I fixed the problem on my looping flow, I have a lot less crashes.
But it turns out that it’s pychromecast that crashes and completely crashes my Home Assistant.

If one of my speakers is unavailable for a while, pychromecast spam 15-20 time :

 2021-02-06 22:48:17 ERROR (Thread-116) [pychromecast.socket_client] [NAME (192.168.X.X): 8009] Failed to connect to service XXXXXXXXXXX._googlecast._tcp.local., Retrying in 5
.0s
 2021-02-06 22:48:54 ERROR (Thread-117) [pychromecast.socket_client] [NAME (192.168.X.X): 8009] Failed to connect to service XXXXXXXXXXX._googlecast._tcp.local., Retrying in 5
.0s
 2021-02-06 22:49:55 ERROR (Thread-118) [pychromecast.socket_client] [NAME (192.168.X.X): 8009] Failed to connect to service XXXXXXXXXXX._googlecast._tcp.local., Retrying in 5
.0s
 2021-02-06 22:50:55 ERROR (Thread-119) [pychromecast.socket_client] [NAME (192.168.X.X): 8009] Failed to connect to service XXXXXXXXXXX._googlecast._tcp.local., Retrying in 5
.0s
....

And then pop the following error:

 2021-02-06 22:54:16 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

 Traceback (most recent call last):
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/helpers.py", line 59, in async_call_api
     result = await session.get (url, params = params or {}, headers = _headers)
   File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request
     conn = await self._connector.connect (
   File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect
     proto = await self._create_connection (req, traces, timeout)
   File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _create_connection
     _, proto = await self._create_direct_connection (req, traces, timeout)
   File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
     hosts = await asyncio.shield (host_resolved)
 asyncio.exceptions.CancelledError
  
 During handling of the above exception, another exception occurred:
  
 Traceback (most recent call last):
   File "/config/custom_components/hacs/hacsbase/hacs.py", line 282, in recurring_tasks_installed
     await self.handle_critical_repositories ()
   File "/config/custom_components/hacs/hacsbase/hacs.py", line 194, in handle_critical_repositories
     critical = await self.data_repo.get_contents ("critical")
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/objects/repository/__init__.py", line 109, in get_contents
     response = await self.client.get (endpoint = _endpoint, params = _params)
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/client.py", line 37, in get
     response = await async_call_api (
   File "/usr/local/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
     ret = await target (* args, ** kwargs)
   File "/usr/local/lib/python3.8/site-packages/aiogithubapi/helpers.py", line 101, in async_call_api
     raise AIOGitHubAPIException (response.data)
   File "/usr/local/lib/python3.8/site-packages/async_timeout/__init__.py", line 55, in __aexit__
     self._do_exit (exc_type)
   File "/usr/local/lib/python3.8/site-packages/async_timeout/__init__.py", line 92, in _do_exit
     raise asyncio.TimeoutError
 asyncio.exceptions.TimeoutError

From there, I must reboot HA to restart the service :confused: