AppDaemon 2.1.9 - no compiled dir error

I have a new installation of AppDaemon 2.1.9 (via pip) on HomeAssistant AIO (not hass.io). I’m trying to get HADashboard setup and I have no other AppDaemon apps running. I’ve read about the breaking changes in 2.1.9 and believe I have everything configured correctly.

I receive the following error in my logs:
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/homeassistant/conf/compiled’

My config:
No disable_apps entry in appdaemon.yaml
A blank apps.yaml
My AppDaemon conf dir is in /home/homeassistant
I have the service set to start as the homeassistant user (and confirmed the process is running as that user)
homeassistant user has read and write permissions to the folders

Does anyone see an issue with my setup?

you get the error because you try to use the dashboard and that tries to write files in the directory:
‘/home/homeassistant/conf/compiled’
that directory isnt there or appdaemon doesnt have enough rights to write in that directory.

Correct, the directory doesn’t exist. I understand it’s created by AppDaemon automatically and apparently it’s unable to do so even though I think I have all my permissions set correctly. The AppDaemon process is running as the homeassistant user and I’m attempting to write to that users home directory.
I know there was a similar issue introduced in 2.1.8 due to the AppDaemon code refactor that caused 2.1.9 to be released. I’m wondering if I’m catching an edge case of that same issue. Perhaps because I don’t already have a compiled directory created?

I’m open to any suggestions.

just create it yourself and set the permissions right and hope that solves it.
i just thought of 1 possibilitie why the permissions could be wrong:

did you use
sudo pip3?

because then you install it as root user.

I did install with ‘sudo pip’ but that was just to install AppDaemon globally. It’s launched as the homeassistant user.

Creating the folders manually fixed the issue. I needed to create a ‘compiled’ dir along with ‘compiled/javascript’ and ‘compiled/css’ but now it launches cleanly. Thanks.

1 Like

i got same error, should i create the “compiled” folder manually? “compiled/javascript” & “compiled/css” is a file or folder? the “compiled” folder set to “rwxrwxrwx” ?

In appdaemon.yaml I set my logfile to /home/homeassistant/conf/log.log and this is the log I checked to see what the errors were. This is what told me the folders that it was looking for. So if you see a message in there about compiled directory does not exist then yes, create it manually.
‘javascript’ and ‘css’` are folders in the compiled folder, so there’s 3 folders you need to create. I created my conf directory in /home/homeassistant/ so I just let my folders inherit permissions, I didn’t change any permission settings so my configure dir is set to drwxr-xr-x.
Interestingly enough the compiled directory also contains an html folder which I didn’t create manually but which the app was apparently able to create.

I have different path with you. my appdaemon’s folder is in"/home/pi/appdaemon/". I try to use homeassistant user to install appdaemon, but i don’t know root passwd. I use Raspberry Pi to install Hassbian system. I switch to “pi” user, create the above 3 folder by manually, and chmod -R 777 of them. Still got the same error: “No directory exists at ‘/home/pi/appdaemon/conf/compiled/javascript’”

I solved the problem. I used PI users to install appdaemon before, and always got the error. So I just used PI users to go to the /home/homeassistant directory, install appdaemon, and manually create compiled, JavaScript, CSS, three directories, and modify their permissions at the same time. Succeed!
But I think it’s still a problem, and many users who install Hassbian with raspberry and install appdaemon may have this problem, and still have to think about how to solve the problem.

Installed Hassbian (pi user) and also got the same problem. Searching I found this thread.
I manually created compiled, javascript and css folders, but I’m in doubt about changing their permissions.

I suspect that I shoud run command below in order to change ownership of folders and files (-R recursive):

chown -R homeassistant.homeassistant /home/homeassistant/.homeassistant/appdaemon

But I’m afraid that I can get things worst if it’s not exacly what I should do.
Can someone give me a hint if I’m in the right path? Thanks!

Digging deeper, I got it to work giving pi user privileges to all files and folders under /appdaemon:

sudo chown -R pi:pi /home/homeassistant/.homeassistant/appdaemon/

If running from the homeassistant home directory my preference would be to run it as the homeassistant user. You can specify the user in the /etc/systemd/system/[email protected] file as shown in the documentation. Then you don’t have to modify any permissions in /home/homeassistant.