NodeRED crashed after var undefined

Heya I just noticed that my node-red keeps crashing all day long.
Inside the logs I could find that node-red seems to have a problem after a function node tries to get an undefined variable.

here an example on how I defined those variables in the past:

var test = flow.get("test") || false;

In the past this worked like "Set the value to flow.test and if that is undefined the variable was set to false".... but this doesn't seem to work anymore. Did I miss a changelog for this behaviour?

It is very unlikely that that is crashing node-red. Can you show us the logs before and after node-red crashes?

sure :slight_smile: my node-red is running as instance of ioBroker.

Does something in the error message tie it to that function? The messages in ioBroker are not normal node-red messages.

NOTE, i am not at all familiar with "running node-red in ioBroker" so i am speculating.

It looks like this nuki node module is not correctly handling errors.

do you know what that is? How this nuki api node module is installed?

I know what nuki is (smart lock) but that error is just there because the module is recharging right now... You can ignore those errors because it is just for small amount of time there, the error for crashing persists if nuki works as expected.

Did you see my question?

@Colin sry did miss your question :confused: but @Steve-Mcl maybe I have to correct myself... I just stopped the link to the nuki node and now it seems to work, but I tested it only 30 minutes for now... the recharging is done and the error isn't appearing anymore o_O

it is now all the same except the connection to the API node from nuki... but it wasn't happening before.... mhhh will take care of it for future and will report back if that will happen again! ty for now!

Are you calling the nuki module from code you have written yourself? A function node for example? If so then you should catch errors from nuki and take appropriate action then it would not crash node-red.

no it is a plugin from palette :slight_smile:

Which one is it? There are two that reference nuki when I do a search.

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