Nodered restart without reason

Hello,

I just begin my test of home assistant and for automatisation I used nodered. But I have an issue with nodered, it restart himself about every hour (sometime more). I don’t understand why I try to remove it (with deletion of nodered folder) and readd it same error :

22 May 15:00:43 - [error] Error: Invalid context key
    at Object.value (/opt/node_modules/@node-red/runtime/lib/nodes/context/index.js:291:31)
    at EventsState.getContextValue (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:143:34)
    at EventsState.getComparatorResult (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:167:27)
    at EventsState.onHaEventsStateChanged (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/events-state/controller.js:71:32)
    at EventEmitter.emit (node:events:538:35)
    at Websocket.emitEvent (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:35:30)
at Websocket.onClientEvents (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:257:22)
    at Object.callback (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:188:65)
    at WebSocket.Connection._handleMessage (/opt/node_modules/home-assistant-js-websocket/dist/haws.cjs:174:30)
    at WebSocket.onMessage (/opt/node_modules/node-red-contrib-home-assistant-websocket/node_modules/ws/lib/event-target.js:199:18)

I don’t find why, can someone already see that ? How can I fix that ? It’s anoying because I have some flow that wait 30/40min before do an action and it’s fail when nodered restart.

Thank in advance

Look in the palette manager, is this the home assistant nodes you are using? There is an older incompatible version.

node-red-contrib-home-assistant-websocket

Hello,

Thank for your reply, yes it’s the nodered I used with home assistant (all installation is done by home assistant). I have the node node-red-contrib-home-assistant-websocket and it’s seem it’s the last version

Try remove the addon, reboot the entire system, not just server restat. Delete/move/rename the nodered folder. restart the system again and then reinstall.

Same issue…

Are you restoring flows or adding nodes? This is just the straight install that is crashing? Without the HA nodes installed?

I restoring flow, I currently test without flow and it’s seem ok, I reimport my flows and I try to enable each flow one by one to see if I can find the guilty

Even with all flow disable ii restart… I open an issue Nodered restarts on its own · Issue #637 · zachowj/node-red-contrib-home-assistant-websocket · GitHub where I’am wrong.