If you’re using Chrome browser, right click within the Hassio interface and click “inspect element”. Under the “Application” tab, delete every local/session storage and the cache. Try also emptying the browser cache etc. Do this of course after updating to the latest versions.
I happen to be also running hassio on a VM, so we might have a similar setup. Tell me if you need more information and I’ll do my best to help you.
Yeah all those login problems were sorted out with the 3.0.3 update.
The problem I have/had was I after I migrated from my RPi to VirtualBox VM where I had the cannot read property for all my devices. Like you had on the 17th April and I had on the 24th April
The short of it:
You can only use the first password you entered in the “credential_secret” in your node red settings, if changed the password you have to revert back the old one and reboot.
The detailed version
The root cause of the issue lies with the “credential_secret” which once you enter it for the first time save and restart node red it encrypts you workflows with that password and that password alone.
You won’t run into any difficulties until you do something big that causes node red to requery the password found in your credentials file against the encrypted key in config/node-red/flows_cred.json in which case they won’t match and Node-red won’t be able to access your flows to execute them.
What I noticed from my backups is the encryption in the file config/node-red/flows_cred.json changes even though I only changed my password once. I am guessing it could have something to do with when you deploy your flows.
The trick I found was to put my original password I created (thank you lastpass for keeping histories) in the config of the node red addon. I then went into my snapshots and into the config/node-red/flows_cred.json file starting with newest and working backwards until the encryption key I used didn’t produce the errors and this meant I didn’t have to lose anything in home assistant via full restore.
I have seen this type of thing mentioned around by @frenck (an admin) and by the developer on the node red forum although they did not specifically target this issue it was enough to get me on the right track and hopefully anyone else that comes across the same issue (where you changed your credential key not knowing you only get one shot at creating it and comes back to haunt you).
I also have got the same login loop problem ! I have the latest Node Red and Hassio installed. Someone can give me some step-by-step instructions to get the dashboard back, please ?! I will loose all of my hair very soon !
Thanks a lot in advance
If you could provide node red log (at the bottom of the node red addon) and maybe HA log (last icon on the right under developer tools) the problem is probably logged in either one of these if you post here one of us might be able to pick out what the error is and point you in the right direction.
ps remember to use 3 of these ``` badboys above and below your each log/code paste which puts keeps it in code format.
Here it is the the node red log "
[16/May/2019:11:31:17 +0200] 401 -(192.168.130.58) GET /ui HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0)
[16/May/2019:11:31:40 +0200] 401 -(192.168.130.58) GET /ui HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0)
[16/May/2019:11:31:47 +0200] 401 -(192.168.130.58) GET /favicon.ico HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0)
I don’t know what the 401 means after the date and time maybe a line number but the rest of that is just saying your computer which has an IP address of 192.168.130.58 browser Firefox version 66 is making a request which is just basic info. This is not the log data we need.
To get the startup code flow where is most likely where the error will be hiding restart your Node red addon and then keep clicking the refresh in the log and you will see node red going through the loading process when it stops loading say up to 5 mins then copy and paste the log again.
ps the character for getting code format is not the quotation marks " it is three back ticks ` together, on my keyboard (qwerty US) it is at the top left of the keyboard to the left of the number 1 (you can see under point 11 here)
Thanks for your patience ! There is nothing suspicious in the NR logs, just some unconfigured node.
Just when I try to login I have the same log entry.
16 May 15:34:48 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant **16 May 15:34:48** - [error] [function:Generate list] TypeError: Cannot read property 'length' of undefined **[16/May/2019:15:36:53 +0200]** 401 -(192.168.130.58) GET / HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0) [16/May/2019:15:37:05 +0200] 401 -(192.168.130.58) GET / HTTP/2.0 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0)
What I noticed in the log anyway, is the different time format, maybe that is the problem. Any thoughts ?
A packed Node-RED, with a bunch of package & system updates, including the Home Assistant Websocket node.
Node-RED Dashboard (UI) is now shipped by this add-on by default and has been patched to work better with Ingress.
The issue with ARM 64-bits is resolved. Which mean that the aarch64 architecture now also works.
The issue with accessing HTTP nodes has been addressed. HTTP endpoints are now freely available when using the /endpoint/ URL prefix. Please take that into account when using this.
Direct access is now enabled by default. This is needed for HTTP nodes and Node-RED Dashboard as well.
Changes
Upgrades python to 2.7.16-r1
Upgrades lua-resty-http to 0.13-r0
Upgrades nginx to 1.14.2-r1
Upgrades nginx-mod-http-lua to 1.14.2-r1
Updates node-red-contrib-home-assistant-websocket to v0.11.0 (#219)
Turns of Lua Resty core in Nginx
Updates node-red-node-serialport to v0.8.3 (#220)
Adds configuration to allow http_node access (#214)
Adds Node-RED Dashboard
Allow for bigger file uploads during import
Adds warning to logout when using the Dark theme
Adds known issues and limitation section to documentation
Patches Denial of Service vulnerability in Axios package (#221)
Thank you for creating this amazing add-on. I’m interested in using !secret for the add-on config but don’t know how. For e.g. should I just use: “credential_secret”: “!secret node_red_crediential”
Also, I experienced the 502 Bad gate way with the following config and there’s no error in the log.
{
“credential_secret”: “xxxxxxx”,
“dark_mode”: false,
“http_node”: {
“username”: “xxxx”,
“password”: “xxxx”
},
“http_static”: {
“username”: “xxxx”,
“password”: “xxxx”
},
“ssl”: false,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_ssl”: true,
“system_packages”: [],
“npm_packages”: [],
“init_commands”: []
}
I still have the same login cycle problem as before. Here it is the hssio log
‘19-05-20 06:31:19 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request running
19-05-20 06:50:58 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_nodered for zoli
19-05-20 06:50:58 WARNING (MainThread) [hassio.auth] Wrong login from zoli
19-05-20 06:51:06 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_nodered for zoli
19-05-20 06:51:07 WARNING (MainThread) [hassio.auth] Wrong login from zoli
19-05-20 06:51:39 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_nodered for zoli
19-05-20 06:51:39 WARNING (MainThread) [hassio.auth] Wrong login from zoli’
What I have detected is that the hassio supervisor is using UTC time settings which is 2 hours behind my tme in homeassistant. This can’t be the source of the problem ?
I tried the soulution recommended by frenck, without success.
I use the credentials I gave in the node red addon config.
I’ running node red 3.1.1 (latest) addon on an rpi Hassio. Yesterday when I deployed the loading icon just looped. Then I tried closing the addon and login again and now I’m stuck on that loading loop when trying to access node red. Tried private mode, clearing site cache, clearing local storage.
The only strange thing I noticed in my NR log is this
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
Anyone know how to solve this? No automation is working so it’s not just that I cant reach the UI, it’s just down. Here is my config