Closed mvaatain closed 2 years ago
Make sure you have read the issue guidelines and that you filled out the entire template.
If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a :+1: reaction to the issue description. Thanks! :+1:
The file it complaints about is empty. Restore it from a backup or delete it and restart Home Assistant.
Where can I find this file? I have the same issue but the folder /usr/src/ seems to be empty.
Below the error I get.
Logger: homeassistant.config_entries Source: util/json.py:45 First occurred: 4:01:53 PM (1 occurrences) Last logged: 4:01:53 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: key must be a string at line 17844 column 4: line 17844 column 4 (char 586778)
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 353, 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 114, in async_load return await self._load_task File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 123, in _async_load return await self._async_load_data() File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 141, 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: key must be a string at line 17844 column 4: line 17844 column 4 (char 586778)
AND
Logger: homeassistant.util.json Source: util/json.py:39 First occurred: 4:01:53 PM (2 occurrences) Last logged: 4:03:04 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: key must be a string at line 17844 column 4: line 17844 column 4 (char 586778)
System Health details
GitHub API | ok GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.26.2 Stage | Available Repositories | 0 Downloaded Repositories | 0
Logged In | true Subscription Expiration | July 29, 2022 at 3:00 AM Relayer Connected | true Remote Enabled | true Remote Connected | true Alexa Enabled | true Google Enabled | true Remote Server | eu-west-2-1.ui.nabu.casa Reach Certificate Server | ok Reach Authentication Server | ok Reach Home Assistant Cloud | ok
Host Operating System | Home Assistant OS 8.2 Update Channel | stable Supervisor Version | supervisor-2022.07.0 Agent Version | 1.2.1 Docker Version | 20.10.14 Disk Total | 109.3 GB Disk Used | 14.9 GB Healthy | true Supported | true Board | rpi4-64 Supervisor API | ok Version API | ok Installed Add-ons | Samba share (10.0.0), ESPHome (2022.3.1), Log Viewer (0.14.0), File editor (5.3.3), Node-RED (13.1.0), Terminal & SSH (9.6.0), Check Home Assistant configuration (3.11.0), WireGuard (0.7.0), Mosquitto broker (6.1.2), Home Assistant Google Drive Backup (0.108.2), Simple Scheduler (0.60)
Checklist
Describe the issue
There are 2 errors
So far I have removed HACS and reinstalled it without success. (https://hacs.xyz/docs/setup/remove)
`Logger: homeassistant.config_entries Source: util/json.py:45 First occurred: 5:16:50 PM (1 occurrences) Last logged: 5:16:50 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: expected value at line 1 column 1: line 1 column 1 (char 0)
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 353, 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 114, in async_load return await self._load_task File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 123, in _async_load return await self._async_load_data() File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 141, 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: expected value at line 1 column 1: line 1 column 1 (char 0)
Logger: homeassistant.util.json Source: util/json.py:39 First occurred: 5:16:50 PM (1 occurrences) Last logged: 5:16:50 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: expected value at line 1 column 1: line 1 column 1 (char 0) `
Reproduction steps
...
Debug logs
Diagnostics dump
Cant take the dump because HACS wont start