Dashboard Loading Error

Thanks again for the reply @ReneTode I have followed your steps…

A couple of things I should maybe point out when launching the container initially I have no permission to edit the appdaemon.yaml I must fist adjust permissions for my user account. All files in the dir are owned by Root…

I have added the extra logging options and re-created the compiled structure as I did before. I’m now back to the the Java Console throwing the below errors.

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (state, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (materialdesignicons.min.css.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.gridster.css.map, line 0) 

Log now looks like this…

2017-10-05 08:37:06.714768 INFO AppDaemon Version 2.1.9 starting
2017-10-05 08:37:06.714955 INFO Configuration read from: /conf/appdaemon.yaml
2017-10-05 08:37:06.789400 INFO Starting Apps
2017-10-05 08:37:06.908667 INFO Got initial state
2017-10-05 08:37:06.909120 INFO Loading Module: /conf/apps/hello.py
2017-10-05 08:37:06.909553 INFO Loading Object hello_world using class HelloWorld from module hello
2017-10-05 08:37:06.944248 INFO hello_world: Hello from AppDaemon
2017-10-05 08:37:06.944843 INFO hello_world: You are now ready to run Apps!
2017-10-05 08:37:06.944929 INFO App initialization complete
2017-10-05 08:37:06.945089 INFO Starting dashboard
2017-10-05 08:37:06.947615 INFO API is disabled
2017-10-05 08:37:06.984414 INFO Connected to Home Assistant 0.54.0
2017-10-05 08:37:24.284757 INFO AppDaemon Version 2.1.9 starting
2017-10-05 08:37:24.284938 INFO Configuration read from: /conf/appdaemon.yaml
2017-10-05 08:37:24.355238 INFO Starting Apps
2017-10-05 08:37:24.453383 INFO Got initial state
2017-10-05 08:37:24.453835 INFO Loading Module: /conf/apps/hello.py
2017-10-05 08:37:24.454251 INFO Loading Object hello_world using class HelloWorld from module hello
2017-10-05 08:37:24.487869 INFO hello_world: Hello from AppDaemon
2017-10-05 08:37:24.488494 INFO hello_world: You are now ready to run Apps!
2017-10-05 08:37:24.488575 INFO App initialization complete
2017-10-05 08:37:24.488743 INFO Starting dashboard
2017-10-05 08:37:24.491261 INFO API is disabled
2017-10-05 08:37:24.541878 INFO Connected to Home Assistant 0.54.0
2017-10-05 08:37:36.094094 INFO New dashboard connected: Family Room
2017-10-05 08:37:36.561697 INFO New dashboard connected: Family Room
2017-10-05 08:37:46.861448 INFO New dashboard connected: Master Bedroom
2017-10-05 08:38:08.202987 INFO New dashboard connected: Family Room
2017-10-05 08:38:20.134013 INFO function [get_dashboard] finished in 95 ms
2017-10-05 08:38:20.143362 INFO Dashboard disconnected
2017-10-05 08:38:22.454473 INFO New dashboard connected: Master Bedroom
2017-10-05 08:38:22.584680 INFO function [get_dashboard] finished in 13 ms
2017-10-05 08:38:22.597285 INFO Dashboard disconnected
2017-10-05 08:38:24.671297 INFO New dashboard connected: Master Bedroom

Nothing has been generated in the error log file.

seems like that the dashboard is running correctly.
how does the screen you get look in the browser?
how do you call the dashboard in the browser?
do you have passwords set?

seems like you still have fileright problems. but i have no experience in docker at all

Dashboards load up with a pop up.

Error getting state, check Java Console for details

I call either direct or select from the main HADashboard menu. No passwords I have stripped this install right back to nothing.

Once I click OK on the pop up 5+ times it will go away but ill have icons missing and lack of functionality state updates etc presumably due to the CSS maps not loading.

what is in the compiled dirs after you tried loading the dashboard?
are the rights for those dirs set correctly?
try creating a dashboard with just one switch and look what error that gives.

Everything in them is owned by root. Which seems to be the norm no matter what I do…

Just loaded up a one switch board as you suggested. The JavaConsole reports the below errors…

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (materialdesignicons.min.css.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.gridster.css.map, line 0)
[Error] WebSocket connection to 'ws://IP:5050/stream' failed: Unexpected response code: 400 (x6)

that can only be right if you run appdaemon as root (which seems unlikely to me)
you need to set the filerights from the directory compiled so that Appdaemon has reading/writing access for all files, subdirs and everything that gets created in there.

My Synology box forces running as sudo through ssh. With that in mind I just cleared the config folder started the container manually through the docker gui and everything built is once again owned by root.

As a test I just gave the whole config dir full r/w permissions to everyone. Restarted and loaded up a dashboard and still the same errors.

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.gridster.css.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (materialdesignicons.min.css.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (state, line 0)
[Error] WebSocket connection to 'ws://IP:5050/stream' failed: Unexpected response code: 400 (x5)

I’m unsure where to go from here.

oke, at least i know now that the filerights in that dir are right.
and we know appdaemon is running as it should be.

is there anything in the ERRORlog?

Error log still empty. Just re-built the config structure by hand and tried launching the container without -e credentials in the docker run command. Still the same outcome.

i have no idea what that means :wink:
like i said i have no exp in docker.

i know there are others who had problems with docker.
but most get connection errors.

error log still empy shouldnt be right.
to what file did you set the error in your appdaemon.yaml and has appdaemon writing acces there?

Error log is set too errorfile: /conf/logs/error.log

i googled a bit on this error and i found that it could be related to your platform.
what browser/ device do you use?

can you try on another browser/ device?

in this topic there are the exact same errors,

but i also found it on a site which was before appdaemon existed.
but there was no solution there.

Thanks @ReneTode appreciate all the help.

Tried on another browser (Chrome) apposed to Safari. Still no joy same errors/problem…

This problem literally spawned from nowhere. I have had HADashboard up and running perfectly previously.

So strange…

did you try other device?
PC, tablet, mobile?

Yes, same problem on mobile and tablet. :frowning:

the i can only hope that @aimc has an idea how to solve this.

Decided to start from scratch today using the docs including the initial test. The test failed to run HADashboard.

I’m at a loss to what i could be doing wrong at this point and can only assume its to do with running on Synology.

Command Ran:

docker run --rm -it -p 5050:5050 \
  -e HA_URL="<HA_URL value>" \
  -e HA_KEY="<HA_KEY value>" \
  -e DASH_URL="http://IP:5050" \
  acockburn/appdaemon:latest

Output:

>   acockburn/appdaemon:latest
2017-10-21 10:10:25.086538 INFO AppDaemon Version 2.1.10 starting
2017-10-21 10:10:25.086711 INFO Configuration read from: /conf/appdaemon.yaml
2017-10-21 10:10:25.351185 INFO Starting Apps
2017-10-21 10:10:25.466198 INFO Got initial state
2017-10-21 10:10:25.466576 INFO Loading Module: /conf/apps/hello.py
2017-10-21 10:10:25.467385 INFO Loading Object hello_world using class HelloWorld from module hello
2017-10-21 10:10:25.590774 INFO hello_world: Hello from AppDaemon
2017-10-21 10:10:25.591433 INFO hello_world: You are now ready to run Apps!
2017-10-21 10:10:25.591514 INFO App initialization complete
2017-10-21 10:10:25.591678 INFO Starting dashboard
2017-10-21 10:10:25.593466 WARNING ------------------------------------------------------------
2017-10-21 10:10:25.593556 WARNING Unexpected error in dashboard thread
2017-10-21 10:10:25.593627 WARNING ------------------------------------------------------------
2017-10-21 10:10:25.615723 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 401, in __init__
    raise ValueError('Not a directory')
ValueError: Not a directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/appdaemon/rundash.py", line 318, in run_dash
    setup_routes(conf.dashboard_obj)
  File "/usr/local/lib/python3.6/site-packages/appdaemon/rundash.py", line 288, in setup_routes
    app.router.add_static('/compiled_javascript', dashboard.compiled_javascript_dir)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 845, in add_static
    follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 404, in __init__
    "No directory exists at '{}'".format(directory)) from error
ValueError: No directory exists at '/conf/compiled/javascript'

2017-10-21 10:10:25.615877 WARNING ------------------------------------------------------------
2017-10-21 10:10:25.615972 INFO API is disabled
2017-10-21 10:10:25.690218 INFO Connected to Home Assistant 0.55.2

create the dirs:

/conf/compiled/javascript
/conf/compiled/css
/conf/compiled/html

und make sure that appdaemon has writing access to those dirs.

Ok its official i’m a fool. I finally found the cause of my problem i had not filled in entity_ids correctly for some of the widgets. It seems i’m back up and running once again.

Thank you so much for sticking with me @ReneTode

your welcome.