HA Auth - Failed to authenticate

Running Hassio 0.82.0 and add-on Nodered 1.1.0. Updated all to the latest version recently when the problem started.
Hass is in SSL and Nodered in SSL was working perfectly before the 1.0 version came out. I was able to login to Nodered with the user provided in de config.
Now Im able to logon to HASS with my user “marcus”, but not to Nodered. It gives error “HA Auth - Failed to authenticate: marcus”

  • It seems that node-red try`s to connect to http instead of https?
  • Are the "unhandeld promise rejection" error`s related?
  • I downgraded en upgraded again, no luck
  • I removed the “node-red” folder and deployed the add-on again. Same problem.
  • Other HASS add-ons run fine
  • Port is changed to 1990
  • I use the hass front-end login credentials
  • Did read Login failed to Node-RED, no real solutions here
  • supervisor version 139

Config file

{
  "log_level": "debug",
  "credential_secret": "[27 characters log pass]",
  "http_node": {
    "username": "",
    "password": ""
  },
  "http_static": {
    "username": "",
    "password": ""
  },
  "port": 1990,
  "ssl": true,
  "certfile": "Cert.pem",
  "keyfile": "Key.pem",
  "require_ssl": true,
  "system_packages": [],
  "npm_packages": [],
  "init_commands": []
}

`
Hassio log

self._write(buf)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write
raise ConnectionResetError('Cannot write to closing transport')
ConnectionResetError: Cannot write to closing transport
18-11-10 21:51:12 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
18-11-10 21:51:12 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_nodered

Node red log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Hass.io Add-on: Node-RED v1.1.0

 Flow-based programming for the Internet of Things

 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 amd64 / Debian GNU/Linux 9 (stretch) / HA 0.82.0 / SU 139 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-config.sh: executing... 
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing... 
[cont-init.d] 80-system-packages.sh: exited 0.
[cont-init.d] 81-npm-packages.sh: executing... 
[cont-init.d] 81-npm-packages.sh: exited 0.
[cont-init.d] 82-user-scripts.sh: executing... 
[cont-init.d] 82-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

The "unhandled promise rejection" is not the issue that’s a different issue I thought was fixed.

Node-RED looks to be successful connecting to the hass.io proxy just fine.

The error is occurring when you try to log into the Node-RED admin interface.

Are you using the same credentials as when you log into the Home Assistant web interface? That part has changed since version 1.0.0.

edit:
I just reread this and saw that you are using the hass.io credentials

If you disable SSL on hass.io does it work?

I spun up a hass.io with SSL enabled on both home assistant and node-red and everything seems to work correctly. I would double check your credentials because really the only way that the ha auth script is going to return HA Auth - Failed to authenticate: marcus is when the server responds with a status code != 200

Yes, I copied/paste the password I used for homeassistant and even used a second and third account.

SOLVED

I removed HASSIO and started from scratch. It is an install of HASSIO on Debian/OpenMediaVault.

I noticed that the prerequisite “network-manager” was not installed. After installing this missing prerequisite I could login to Node-red with my homeassistant user. :flushed:

Thanks Kermit for the support!

To whom it may concern:
There is an issue with the Node RED login, when special characters are used in the HA password.
See: https://github.com/hassio-addons/addon-node-red/issues/80