HA 0.90.2 in docker container /config/ui-lovelace.yaml not found

I’m moving to a docker environment from a virtual environment and have run into a strange (for me) situation.
Lovelace isn’t starting. System Health reports:

arch x86_64
dev false
docker true
hassio false
os_name Linux
python_version 3.7.2
timezone Australia/Sydney
version 0.90.2
virtualenv false

Lovelace

error /config/ui-lovelace.yaml not found
mode yaml

ui-lovelace.yaml

yet the file is in the configuration directory

-rwxrwxrwx 1 john john 706 Mar 23 14:39 ui-lovelace.yaml

I tried giving it global access in case it was a strange permission thing, but no deal.

A ‘find’ within the container locates the file in the /config directory.
I have no name!@15b560d66de1:/$ find / -name *.yaml

finds it in /config

/usr/src/app/homeassistant/components/media_player/services.yaml
/usr/src/app/homeassistant/components/rainmachine/services.yaml
find: ‘/var/cache/ldconfig’: Permission denied
find: ‘/var/cache/apt/archives/partial’: Permission denied
find: ‘/etc/ssl/private’: Permission denied
/config/ui-lovelace.yaml
/config/scripts.yaml
/config/apdconf/apps/apps.yaml
/config/apdconf/secrets.yaml
/config/apdconf/appdaemon.yaml
/config/secrets.yaml
/config/config/binary_sensor/hall_motion.yaml
/config/config/binary_sensor/office_window.yaml

I’m at a loss to understand what’s happening. The file in question is a copy of the one that is working in the virtual environment.

Any thoughts?

John

If that is your configuration directory, where is configuration.yaml?
You won’t find the config directory in a disposable container. Your configuration directory will be in a mapped directory you specified when you created the container or in docker-compose… In short that yaml file is not being seen because it’s in the wrong place.

My configuration.yaml file isn’t shown because I have only shown part of the the output from the find command @DavidFW1960.

The configuration files are in a directory that is mounted on the empty /config directory in the container by Docker when the container is spun up. Because the mounted directory is accessible by any programs running within the Docker container, running ‘find’ from / within the container will search all the directories within the container as well as any external directories that have been mounted.

The problem turned out to be an incorrectly mapped resource within the file.
Version 0.87.1 stopped reading the resources at that point but continued to build the interface. Versions 0.9x seem to throw their hands in the air and give up, saying the ui-lovelace.yaml file wasn’t found.
The error should be that there is something wrong with the file contents, rather than pretend it doesn’t exist.

1 Like

+1 I’m seeing the same

Rename your ui-lovelace.yaml file to something else. I usually add a - to the end.
Create a new empty ui-lovelace.yaml file and see if lovelace is happy. The HA info page should show 0 resources and 0 views. This proves it can find the file.
Copy/paste your resource links to the new file and check if lovelace loads. Info should show the number of resources you have.
If everything is ok, do the same with your views.
If not, delete the resource links one by one from the end of the list, saving the file and refreshing lovelace between each delete. When it’s happy, the last link you deleted is the error. Check to make sure it points to the correct location (in your original ui-lovelace.yaml file). If you find an error, paste the links back and fix the error.

Versions prior to .90 silently ignored any errors and just stopped loading resources at the error. .90 pretends the uni-lovelace.yaml file is missing.