New Install: Could not parse JSON content: /config/.storage/core.config_entries - Solution (but also WTF?!)

Posting this here in case it’s helpful to others - there seem to be a bunch of similar-ish topics, but none had the solution I needed.

The situation
This is my first HA install. I followed the X86-64 install guide using a NUC type machine. All seemed to go well, but on first boot I got the thing where all looks good on port 4357, but get connection refused on 8123.

I ran core logs and got Could not parse JSON content: /config/.storage/core.config_entries, and supervisor logs showed that core had shutdown.

/config/.storage/core.config_entries turned out to be an empty file, which I fixed by adding “{}” to it. On restart, a similar thing happened except this time it was /config/.storage/core.restore_state and it was missing a closing curly brace.

I added it back in, and now it seems to be working.

The solution
Is to add the missing curly braces, and restart. HA’s /config directory is /mnt/data/supervisor/homeassistant/config on the host system. Detailed steps below.

At the CLI type this:
login - this gets us a command prompt on the host system (I think).
echo "{}" >> /mnt/data/supervisor/homeassistant/config/.storage/core.config_entries - add the curly braces
echo "\n}" >> /mnt/data/supervisor/homeassistant/config/.storage/core.restore_state - add one curly brace
core restart

(I’m writing this from memory, so if this doesn’t look quite right to anyone, please correct me!)

The WTF
Why on a new system, on a fresh install is one file empty and, weirder still, is one file missing its closing curly brace? Seems so strange.

Maybe there are other issues too, but so far (through onboarding) so good.

Thanks @infmatter this helped me a lot. I had a similar problem after moving my whole RaspberryPi data from one thumb drive to another using dd. Home Assistant just wouldn’t start anymore. After adding curly braces in core.restore_state it now works fine again.

1 Like