I recently updated to core_2022.8.6 and HACS seems to have disappeared in the process.
The reason for this “disappearance” is clear: I get the following errors in my log:
Error setting up entry for hacs
Logger: homeassistant.config_entries
Source: util/json.py:45
First occurred: 9:52:14 PM (1 occurrences)
Last logged: 9:52:14 PM
Error setting up entry for hacs
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 39, in load_json
return orjson.loads(fdesc.read()) # type: ignore[no-any-return]
orjson.JSONDecodeError: unexpected character: line 23902 column 44 (char 780993)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hacs/__init__.py", line 223, in async_setup_entry
setup_result = await async_initialize_integration(hass=hass, config_entry=config_entry)
File "/config/custom_components/hacs/__init__.py", line 209, in async_initialize_integration
await async_try_startup()
File "/config/custom_components/hacs/__init__.py", line 196, in async_try_startup
startup_result = await async_startup()
File "/config/custom_components/hacs/__init__.py", line 153, in async_startup
if not await hacs.data.restore():
File "/config/custom_components/hacs/utils/data.py", line 120, in restore
repositories = await async_load_from_store(self.hacs.hass, "repositories") or {}
File "/config/custom_components/hacs/utils/store.py", line 49, in async_load_from_store
return await get_store_for_key(hass, key).async_load() or {}
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 116, in async_load
return await self._load_task
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 125, in _async_load
return await self._async_load_data()
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 143, in _async_load_data
data = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/json.py", line 45, in load_json
raise HomeAssistantError(error) from error
homeassistant.exceptions.HomeAssistantError: unexpected character: line 23902 column 44 (char 780993)
and Could not parse JSON content: /config/.storage/hacs.repositories
Logger: homeassistant.util.json
Source: util/json.py:39
First occurred: 9:52:14 PM (1 occurrences)
Last logged: 9:52:14 PM
Could not parse JSON content: /config/.storage/hacs.repositories
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 39, in load_json
return orjson.loads(fdesc.read()) # type: ignore[no-any-return]
orjson.JSONDecodeError: unexpected character: line 23902 column 44 (char 780993)
However, the weird thing is that, if I access HA locally, I get a whole series of “custom element does not exist…” errors as I’d expect if HACS were missing. But if I access HA via nabu casa, everything works as it did before the update.
Any idea on what is going wrong and, more importantly, how to fix it?
Thanks.