Node Red crashes on startup

After my SSD became unreadable, I had to reinstall everything. I had a backup of my flows and the package.json, which made it a little easier. Everything installed fine. But, when I start NR, it crashes immediately. But when I start it with node-red -safe, it starts fine. I thought that would start NR in safe mode ? It doesnt. I know in the past I had to start in safe mode, and I thought that was the way. Its running normally, with no exclamation mark to warn me that its running in safe mode. Should I just always start it this way ?
This is what is showing in the powershell window when starting with just node-red

C:\Windows\System32>node-red
15 Nov 15:44:41 - [info]

Welcome to Node-RED
===================

15 Nov 15:44:41 - [info] Node-RED version: v3.1.0
15 Nov 15:44:41 - [info] Node.js  version: v20.9.0
15 Nov 15:44:41 - [info] Windows_NT 10.0.22631 x64 LE
15 Nov 15:44:43 - [info] Loading palette nodes
15 Nov 15:44:44 - [info] Polymer started at /polymer
15 Nov 15:44:45 - [info] Dashboard version 3.6.1 started at /ui
15 Nov 15:44:46 - [info] Settings file  : C:\Users\lenov\.node-red\settings.js
15 Nov 15:44:46 - [info] Context store  : 'default' [module=localfilesystem]
15 Nov 15:44:46 - [info] User directory : \Users\lenov\.node-red
15 Nov 15:44:46 - [warn] Projects disabled : editorTheme.projects.enabled=false
15 Nov 15:44:46 - [info] Flows file     : \Users\lenov\.node-red\flows.json
15 Nov 15:44:46 - [info] Server now running at http://127.0.0.1:1880/
15 Nov 15:44:46 - [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.
---------------------------------------------------------------------

15 Nov 15:44:46 - [warn] Encrypted credentials not found
15 Nov 15:44:46 - [info] Starting flows
15 Nov 15:44:46 - [error] [position-config:1f69d2e37d8520dd] Coordinates Latitude and Longitude is missing in the configuration node!
15 Nov 15:44:46 - [error] [ntc-node-red-pushover-notifications:Node Red] Pushover credentials have not been set up
15 Nov 15:44:46 - [error] [ntc-node-red-pushover-notifications:Node Red] Pushover credentials have not been set up
15 Nov 15:44:46 - [error] [ntc-node-red-pushover-notifications:Node Red] Pushover credentials have not been set up
15 Nov 15:44:46 - [error] [ntc-node-red-pushover-notifications:Node Red] Pushover credentials have not been set up
15 Nov 15:44:46 - [error] [ntc-node-red-pushover-notifications:Node Red] Pushover credentials have not been set up
15 Nov 15:44:46 - [error] [ntc-node-red-pushover-notifications:Node Red] Pushover credentials have not been set up
15 Nov 15:44:46 - [error] [e-mail:mike.kramer@blueyonder.co.uk] No e-mail userid set
15 Nov 15:44:46 - [error] [e-mail:mike.kramer@blueyonder.co.uk] No e-mail password set
15 Nov 15:44:46 - [info] Started flows
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 bbq1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 temperaturerain1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 temperature1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 humidity1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 temperaturehumidity1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 temphumbaro1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 thermostat1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 rain1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wind1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
(node:5176) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uv1 listeners added to [RfxCom]. Use emitter.setMaxListeners() to increase limit
Shelly gen1 server is listening on port 20001
15 Nov 15:44:46 - [info] [rfx-sensor:Temp Wine Fridge Back] connecting to COM4
15 Nov 15:44:46 - [error] [daikin-controller:AC Study Speed] Could not get basic info: Error: Error while communicating with Daikin device: ECONNRESET
15 Nov 15:44:46 - [red] Uncaught Exception:
15 Nov 15:44:46 - [error] TypeError: myenergi.getStatusEddiAll is not a function
    at GetEddiAll._inputCallback (C:\Users\lenov\.node-red\node_modules\node-red-contrib-myenergi\getEddiAll.js:14:44)
    at C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\Node.js:210:26
    at Object.trigger (C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\util\lib\hooks.js:166:13)
    at Node._emitInput (C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\Node.js:202:11)
    at Node.emit (C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\Node.js:186:25)
    at Node.receive (C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\Node.js:494:10)
    at deliverMessageToDestination (C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\flows\Flow.js:799:40)
    at Immediate.<anonymous> (C:\Users\lenov\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\flows\Flow.js:815:21)
    at process.processImmediate (node:internal/timers:478:21)

It looks like node-red-contrib-myenergi is NOT correctly handling async errors (causing node-red to crash)

You should raise an issue on its repository

That should be
node-red --safe

I think I found the issue. For whatever reason, NR lost the myenergi api key, amongst a lot of other configuration data, email password, pushover keys etc. After entering those again, it seems to work.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.