Error getting state after AppDaemon upgrade to 4.0.1

I (accidentally) upgraded from AppDaemon 3.0.4 to 4.0.1 last night and everything broke. Well, yes, I had to rewrite the appdaemon.yaml configuration file. No problem. Great documentation - thanks!

Then there was a detailed HADashboard error screen which I fixed by clearing the browser cache. Again, thanks for the pointer.

What I can’t get rid of is a javascript popup on every dashboard saying “Error getting state, check Java Consule for details”. Spelling error and all.

Here’s what the console has to say.

ReferenceError: error is not defined
knockout-3.4.1.js line 68 > Function:3:57
    text http://<url>:5050/javascript/knockout-3.4.1.js line 68 > Function:3
    update http://<url>:5050/javascript/knockout-3.4.1.js:98
    m http://<url>:5050/javascript/knockout-3.4.1.js:72
    Qc http://<url>:5050/javascript/knockout-3.4.1.js:51
    Rc http://<url>:5050/javascript/knockout-3.4.1.js:51
    aa http://<url>:5050/javascript/knockout-3.4.1.js:50
    B http://<url>:5050/javascript/knockout-3.4.1.js:49
    m http://<url>:5050/javascript/knockout-3.4.1.js:72
    q http://<url>:5050/javascript/knockout-3.4.1.js:11
    m http://<url>:5050/javascript/knockout-3.4.1.js:71
    h http://<url>:5050/javascript/knockout-3.4.1.js:69
    g http://<url>:5050/javascript/knockout-3.4.1.js:69
    h http://<url>:5050/javascript/knockout-3.4.1.js:70
    Sb http://<url>:5050/javascript/knockout-3.4.1.js:76
    WidgetBase http://<url>:5050/javascript/dashboard.js:410
    baseerror http://<url>:5050/compiled_javascript/application.js:1002
    <anonymous> http://<url>:5050/compiled_javascript/default/<dashboard-name>_init.js:91
    jQuery 2
        j
        k

I reverted to AppDaemon 3.0.4 and everything is glorious.

I hope you found resolution, if not my experience may help. I’m getting your same error “Error getting state, check Java Console for details” but only on Firefox browser on a Windows 10 box. The Edge browser in Windows 10 works without error as do my Android devices running Chrome browser. I believe this is a result of Mozilla removing support for most NPAPI plugins in Firefox that is required for Java.

One day later:

Updated to AppDaemon 4 version 0.21.5 and all my browsers work as they should. Thank You.

Appdaemon needed api: enabled to work.

Thanks for your ideas. I’m running headless on a linux server, so the browser is not the problem. I haven’t had a reason to update appdaemon yet so perhaps any glitches will have been smoothed out by the time I do.

I don’t know what that means.

Add the line
api: to your config

For anyone else that runs into this: clearing the browser cache fixed it for me