Node red problem after updating packages 2022

Hi All

I really need some help I have ben trying to solve this but I dont have a backup to rool-back to
So I really need a way to fix this Node red stops while loading…
This happened right after I added a secound Hue HUB to Hue magic and did a bunch of upgrades to the node libraries

I am running Home assistant on a VM version:
Version
core-2022.2.9
Newest Version
core-2022.2.9
Version
supervisor-2022.01.1
Newest Version
supervisor-2022.01.1
Channel
stable

The logs I have found so far:
Node red logs

> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
27 Feb 01:05:52 - [info] 
Welcome to Node-RED
===================
27 Feb 01:05:52 - [info] Node-RED version: v2.2.1
27 Feb 01:05:52 - [info] Node.js  version: v16.14.0
27 Feb 01:05:52 - [info] Linux 5.10.98 x64 LE
27 Feb 01:05:52 - [info] Loading palette nodes
27 Feb 01:05:54 - [info] Dashboard version 2.27.0 started at /endpoint/ui
27 Feb 01:05:54 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
/bin/sh: /config/node-red/node_modules/node-red-node-pi-gpio/testgpio.py: not found
27 Feb 01:05:55 - [info] Settings file  : /etc/node-red/config.js
27 Feb 01:05:55 - [info] Context store  : 'default' [module=memory]
27 Feb 01:05:55 - [info] User directory : /config/node-red/
27 Feb 01:05:55 - [info] Projects directory: /config/node-red/projects
27 Feb 01:05:55 - [info] Server now running at http://127.0.0.1:46836/
27 Feb 01:05:55 - [info] Active project : NightLights
27 Feb 01:05:55 - [info] Flows file     : /config/node-red/projects/NightLights/flows.json
27 Feb 01:05:55 - [info] Starting flows
27 Feb 01:05:55 - [info] [hue-bridge:Philips hue 1] Initializing the bridge (192.168.0.29)…
27 Feb 01:05:55 - [info] [hue-bridge:Philips hue 2] Initializing the bridge (192.168.0.30)…
27 Feb 01:05:55 - [info] Started flows
27 Feb 01:05:55 - [info] [mqtt-broker:MQTT] Connected to broker: mqtt://192.168.0.12:1883
27 Feb 01:05:55 - [info] [hue-bridge:Philips hue 2] Connected to bridge
27 Feb 01:05:55 - [info] [hue-bridge:Philips hue 1] Connected to bridge
27 Feb 01:05:56 - [info] [hue-bridge:Philips hue 2] Processing bridge resources…
27 Feb 01:05:56 - [info] [hue-bridge:Philips hue 2] Initial emit of resource states…
27 Feb 01:05:56 - [info] [hue-bridge:Philips hue 1] Processing bridge resources…
27 Feb 01:05:56 - [info] [hue-bridge:Philips hue 1] Initial emit of resource states…
27 Feb 01:05:56 - [error] [hue-group:Terrasse] The group in not yet available. Please wait until HueMagic has established a connection with the bridge or check whether the resource ID in the configuration is valid..
27 Feb 01:05:56 - [error] [hue-group:Udendørsbelysning] The group in not yet available. Please wait until HueMagic has established a connection with the bridge or check whether the resource ID in the configuration is valid..
27 Feb 01:05:56 - [error] [api-call-service:FAN_3 HAVEN ON] Call-Service attempted without connection to server.
27 Feb 01:05:56 - [error] [hue-scene:Haven] Error: Request failed with status code 404
27 Feb 01:05:56 - [info] [hue-bridge:Philips hue 2] Keeping nodes up-to-date…
27 Feb 01:05:56 - [info] [hue-bridge:Philips hue 2] Subscribing to bridge events…
27 Feb 01:05:56 - [red] Uncaught Exception:
27 Feb 01:05:56 - [error] TypeError: Cannot read properties of undefined (reading 'length')
    at new HueBridgeMessage (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/messages.js:17:61)
    at HueBridge.get (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:306:23)
    at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge.js:84:30
    at EventEmitter.<anonymous> (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:556:7)
    at EventEmitter.emit (node:events:520:28)
    at HueBridge.pushUpdatedState (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:275:16)
    at Timeout._onTimeout (/config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:177:13)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
[01:05:56] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
27 Feb 01:05:57 - [info] 
Welcome to Node-RED

And from the HA log file

22-02-27 00:57:18 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPLICATION' starting 5 add-ons
22-02-27 00:57:18 WARNING (MainThread) [supervisor.addons.options] Option 'Option' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:18 WARNING (MainThread) [supervisor.addons.options] Option 'port' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:18 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:19 INFO (SyncWorker_0) [supervisor.docker.interface] Cleaning addon_a0d7b954_nodered application
22-02-27 00:57:19 WARNING (SyncWorker_0) [supervisor.addons.options] Option 'Option' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:19 WARNING (SyncWorker_0) [supervisor.addons.options] Option 'port' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:19 WARNING (SyncWorker_0) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:20 INFO (SyncWorker_0) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/node-red/amd64 with version 11.0.3
22-02-27 00:57:20 INFO (SyncWorker_7) [supervisor.docker.interface] Cleaning addon_a0d7b954_logviewer application
22-02-27 00:57:20 WARNING (MainThread) [supervisor.addons.options] Option 'Option' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:20 WARNING (MainThread) [supervisor.addons.options] Option 'port' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:20 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:20 WARNING (MainThread) [supervisor.addons.options] Option 'Option' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:20 WARNING (MainThread) [supervisor.addons.options] Option 'port' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:20 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)
22-02-27 00:57:21 INFO (SyncWorker_7) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/log-viewer/amd64 with version 0.12.2

I dont have any nginx setup and ssl is false in the configuration for Node red
image

Anything I can do to keep all my Node-red automations?

Best regards
Casperse

1 Like

wherever your node red config files are stored you’ll want the .js and .json files
looks for settings.js package.json flows*.json
grab all that stuff and make a copy somewhere.
so *.js and *.json

Enable safe mode on the config page of the nodered addon. Then remove problematic nodes.

Sorry how do I do that in the configuration file as an option: ?

log_level: info
credential_secret: KJHhfdhiFRENCKfsdfdsDHFHDJS
http_node:
  username: MarryPoppins
  password: Supercalifragilisticexpialidocious
http_static:
  username: MarryPoppins
  password: Supercalifragilisticexpialidocious
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
system_packages:
  - ffmpeg
npm_packages:
  - node-red-admin
init_commands:
  - echo 'This is a test'
  - echo 'So is this...'
```[quote="Mikefila, post:3, topic:397069, full:true"]
Enable safe mode on the config page of the nodered addon. Then remove problematic nodes.
[/quote]

so add:

safe_mode: true

to the configuration

Thanks! :slight_smile: much appriciated

Hello,

Safe problem on my side.
For I unknow reason and no change on my side, it"s impossible to launch NodeRed with Bad Gateway error.

I have this error on NodeRed log :
2022/03/01 13:03:19 [error] 608#608: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:46836/", host: "xxxx.duckdns.org:8123", referrer: "https://xxxx.duckdns.org:8123/a0d7b954_nodered"

And this warning on Supervisor log :
22-03-01 13:03:19 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)

By adding safe_mode : true I was able to launch NodeRed but with this information on connection
image

So nothing is resolved :frowning:
Can someone help me because I doesn’t have any automation that works anymore :frowning: :pray:

Remove require_ssl on the nodered addon configuration page.

You mean I have to put ssl: false on the configuration ?

I mean remove the line require_ssl: true/false

I haven’t this setting

require_ssl

but I have this settings on HA :

certfile: fullchain.pem
credential_secret: xxxxxxxxxxxxxxxxxxx
http_node:
  password: ''
  username: ''
http_static:
  password: ''
  username: ''
init_commands: []
keyfile: privkey.pem
npm_packages: []
ssl: true
system_packages: []
theme: default
require_ssl: true
log_level: fatal
safe_mode: false

it’s right there

I’m having a similar issue. I’m able to get to Node-Red, but none of my node or flows that use HuMagic are working. I continually get this error in Node-Red

The group in not yet available. Please wait until HueMagic has established a connection with the bridge or check whether the resource ID in the configuration is valid…

I’m thinking it has something to do with the recent Node-Red update. I’m going to roll back the update and see if it resolves.

Sorry :frowning:

I did it but nothing change. I had the same behavior

Why you talk about HueMagic ?
I haven’t Hue ressource on my configuration (at least on Node Red)

I’m getting the same errors in my log as you are in relation to Hue Magic.

What version of the addon are each of you running?

11.0.4 for me

image

I’m on 11.0.4 as well.

How do you understand this error log :

2022/03/01 13:03:19 [error] 608#608: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-nodered, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:46836/", host: "xxxx.duckdns.org:8123", referrer: "https://xxxx.duckdns.org:8123/a0d7b954_nodered"