Hassio node-red integration crash

Hello,

I use hassio with node-red integration.
I have used node-red integration for some months. Earlier I installed Node-RED Companion from hacs, because I used the Devices node. Today I tried to install ‘node-red-debugger’ from 'palette manager, but it didn’t appear in installed nodes. When I tried to reinstall I got an error, that the ‘node-red-debugger’ already installed. After that I made some new funciton in Node-red. At least I put and set the entity node (which create entity in home assistant). When I duplicate this parameterised node and deploy it, the node-red crashed. The log:

[22:22:54] INFO: Starting Node-RED…

start
node $NODE_OPTIONS node_modules/node-red/red.js “–settings” “/etc/node-red/config.js”
15 Dec 22:22:58 - [info]
Welcome to Node-RED
===================
15 Dec 22:22:58 - [info] Node-RED version: v2.1.4
15 Dec 22:22:58 - [info] Node.js version: v16.13.1
15 Dec 22:22:58 - [info] Linux 5.10.17-v8 arm64 LE
15 Dec 22:23:00 - [info] Loading palette nodes
15 Dec 22:23:05 - [info] Dashboard version 3.1.2 started at /endpoint/ui
15 Dec 22:23:07 - [info] Settings file : /etc/node-red/config.js
15 Dec 22:23:07 - [info] Context store : ‘default’ [module=memory]
15 Dec 22:23:07 - [info] User directory : /config/node-red/
15 Dec 22:23:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Dec 22:23:07 - [info] Flows file : /config/node-red/flows.json
15 Dec 22:23:07 - [info] Server now running at http://127.0.0.1:46836/
15 Dec 22:23:07 - [info] Starting flows
15 Dec 22:23:09 - [info] Started flows
15 Dec 22:23:09 - [info] [mqtt-broker:hassio mqtt broker] Connected to broker: mqtt://localhost:1883
15 Dec 22:23:12 - [info] [server:Home Assistant] Connecting to undefined
15 Dec 22:23:12 - [info] [server:Home Assistant] Connected to undefined
15 Dec 22:23:12 - [red] Uncaught Exception:
15 Dec 22:23:12 - [error] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason “#”.

What is the problem and how can I solve it?

Maybe you need to setup HA as a server in Node-Red and select it in the node.

I Don’t know how I can setup server, because the node red hasn’t started. I can’t see any server setup line in Home assistant → Supervisor → Node-red → Configuration
My configuration:

certfile: fullchain.pem
credential_secret: djani
http_node:
  password: xxxxxxxx
  username: djani
http_static:
  password: xxxxxxxx
  username: djani
init_commands: []
keyfile: privkey.pem
npm_packages: []
ssl: false
system_packages:
  - make
  - g++
  - gcc
  - python2
theme: default

hmm, I have system_packages section and I have just two single quotes in the password and username for both http and https.
And I am running version 10.2.0.

Your error can be related to the debugger though, since catch functions are commands to catch errors and react to them with having the program crash, but in this case it looks like the catch command is not complete.

Yes. I think you are right. Can I save and restore flows from file system. After I delete and reinstall the node-red, because I haven’t liked to lose my node-red work since the last system backup.

I have never tried that, so no idea.
I have always been able to get into Node-Red and then just copy the flows to the clipboard and save that to some text editor somewhere.

Yes, but I can’t do that at the moment. :frowning: