addon-node-red icon indicating copy to clipboard operation
addon-node-red copied to clipboard

Node-Red does not start in Homeassistant OS 12.2

Open JuliusH93 opened this issue 10 months ago • 6 comments

Problem/Motivation

I upgraded to Homeassistant OS 12.2 and also updated the addon to the newest version 17.0.12.

Homeassistant Version:

Core 2024.4.4 Supervisor 2024.04.4 Operating System 12.2 Frontend 20240404.2

Expected behavior

The addon should start like it did before the update.

Actual behavior

There is an error loading a config while starting the addon. Logs:


Add-on: Node-RED Flow-based programming for the Internet of Things

Add-on version: 17.0.12 You are running the latest version of this add-on. System: Home Assistant OS 12.2 (aarch64 / odroid-c4) Home Assistant Core: 2024.4.4 Home Assistant Supervisor: 2024.04.4

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service init-nginx: starting s6-rc: info: service init-customizations: starting s6-rc: info: service init-customizations successfully started s6-rc: info: service init-nodered: starting s6-rc: info: service init-nginx successfully started npm ERR! code EJSONPARSE npm ERR! path /config/package.json npm ERR! JSON.parse Unexpected end of JSON input while parsing empty string npm ERR! JSON.parse Failed to parse JSON data. npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-01T19_26_56_925Z-debug-0.log [21:26:58] WARNING: Failed un-installing conflicting packages s6-rc: info: service init-nodered successfully started s6-rc: info: service nodered: starting s6-rc: info: service nodered successfully started s6-rc: info: service nginx: starting s6-rc: info: service nginx successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [21:26:58] INFO: Setting safe mode startup [21:26:58] INFO: Starting Node-RED...

start node $NODE_OPTIONS node_modules/node-red/red.js --safe --settings /etc/node-red/config.js

Error loading settings file: /etc/node-red/config.js SyntaxError: Error parsing /config/package.json: Unexpected end of JSON input at parse () at read (node:internal/modules/package_json_reader:79:16) at readPackage (node:internal/modules/package_json_reader:140:10) at Object.readPackageScope (node:internal/modules/package_json_reader:157:19) at Module._extensions..js (node:internal/modules/cjs/loader:1388:35) at Module.load (node:internal/modules/cjs/loader:1203:32) at Module._load (node:internal/modules/cjs/loader:1019:12) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:177:18) at Object. (/etc/node-red/config.js:1:16) { path: '/config/package.json' } [21:27:02] INFO: Service Node-RED exited with code 1 (by signal 0) s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service nginx: stopping [21:27:02] INFO: Service NGINX exited with code 256 (by signal 15) s6-rc: info: service nginx successfully stopped s6-rc: info: service init-nginx: stopping s6-rc: info: service nodered: stopping s6-rc: info: service init-nginx successfully stopped s6-rc: info: service nodered successfully stopped s6-rc: info: service init-nodered: stopping s6-rc: info: service init-nodered successfully stopped s6-rc: info: service init-customizations: stopping s6-rc: info: service init-customizations successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

Node red gets started with /etc/node-red/config.js as the settings file but i cannot find this path on my system.

Any help is highly appreciate since I have no idea how to fix this issue and get my flows running again.

JuliusH93 avatar May 01 '24 19:05 JuliusH93

I've also been having issues since updating to Core 2024.4.4. Node-RED is now throwing "InputError: Integration not loaded." I need help! Thx

grafik

berndeee avatar May 02 '24 15:05 berndeee

Same issue for me. Got the same errors as @berndeee

Feuerhamster avatar May 02 '24 22:05 Feuerhamster

Two different issues here.

@JuliusH93 - There is an issue with the package.json by the looks of it, I would suggest checking the syntax with an editor such as Studo Code.

Others please don't randomly attach issues, your problem is with the Integration which you can find at https://github.com/zachowj/hass-node-red

sinclairpaul avatar May 03 '24 01:05 sinclairpaul

Same issue for me. Got the same errors as @berndeee

@Feuerhamster look at this https://community.home-assistant.io/t/node-red-error-after-updating-homeassistant-to-version-2024-5-0/724520

berndeee avatar May 03 '24 12:05 berndeee

For some reason the update to Homeassistant 12.2 seemed to have corrupted the node-red config files.

I have now exported the flows from a backup prio to the update, completely removed the addon from the updated version with deleting all folders i could find (including the on in addon_configs) and reinstalled the addon again.

Now it is working and in could reimport the flows without any problems :)

For me the issue can be closed but is it normal that the update corrupted the node-red installation?

JuliusH93 avatar May 03 '24 12:05 JuliusH93

@JuliusH93 I met totally same problem. How did you solved this issue?

pfwei1029 avatar May 11 '24 01:05 pfwei1029

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Jun 10 '24 08:06 github-actions[bot]