I’ve just installed node-red v3.0.2 in a docker container, for use with my HA 2022.11 Core instance (also running in a docker container. I followed the instructions from here:
Eveything seemed to go OK, but when I got to the last stage (opening the events:state node and trying to list the HA entities) node-red crashed with the error “invalid access token for websocket”
I had generated a long-life access token in HA, and supplied this to the node-red server details.
Any idea how I can diagnose this?
Edit: I’ve just re-done the process and the node-red server crashes as soon as I deploy the HA server in the node-red UI
sudo docker run -it -p 1880:1880 -v nodered:/data --name nodered nodered/node-red
7 Dec 18:28:26 - [info]
Welcome to Node-RED
===================
7 Dec 18:28:26 - [info] Node-RED version: v3.0.2
7 Dec 18:28:26 - [info] Node.js version: v16.16.0
7 Dec 18:28:26 - [info] Linux 5.4.0-131-generic x64 LE
7 Dec 18:28:28 - [info] Loading palette nodes
7 Dec 18:28:31 - [info] Settings file : /data/settings.js
7 Dec 18:28:31 - [info] Context store : 'default' [module=memory]
7 Dec 18:28:31 - [info] User directory : /data
7 Dec 18:28:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
7 Dec 18:28:31 - [info] Flows file : /data/flows.json
7 Dec 18:28:31 - [info] Server now running at http://127.0.0.1:1880/
7 Dec 18:28:31 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
7 Dec 18:28:31 - [info] Starting flows
7 Dec 18:28:31 - [info] Started flows
7 Dec 18:28:31 - [info] [server:Home Assistant] Connecting to https://192.168.1.36:8123
7 Dec 18:28:31 - [red] Uncaught Exception:
7 Dec 18:28:31 - [error] Error: Invalid access token for websocket
at /data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:112:29
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Websocket.connect (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js: