The promise rejected with the reason "#<Object>"

My node-red stops working every 7-10 days. There is only one line of code in the log. Does anyone have a similar situation? Or can you tell me some directions of the investigation?

Normally I would expect there to be a stack trace with that, giving more information. Also I note that it says [red] against it, I don't think a normal node-red install would show that, I think it should be [Error]. I suspect, therefore, that this is a Home Assistant issue rather than a true node-red issue so you may have to ask for help in an HA forum.

1 Like

Seems doesn't error in homeassistant... It is hard to describe problem in HA forum..
In fact, I encountered the same problem on both devices. Because I transferred from nas to unraid, but I used the same node, which I copied directly. So this should not be the problem of Noded itself. It should be that I have an error somewhere, but the log description is not detailed enough. I really can't find it.
It crashes every 7-10 days, which is really painful...... :expressionless:

I notice that it did not restart automatically. Does node red on HA not normally restart following a crash?

No, it does not start automatically. Cause all automation to fail...

I thought they ran it in a container... containers can be set to restart... so I'm surprised they don't.

Was it just node-red that stopped, or did the whole of HA? What did you do to restart it?

This is one of those notoriously difficult issues to track down.

Something you are using in your flows is missing some error handling and causing this top level error handler to kick in and stop things running.

Sadly the stack doesn't give use any decent clues as to what the route cause is.

One thing you could try is adding something like the following to your settings.js file.

process.on('unhandledRejection', (reason, promise) => {
  console.log('Unhandled Rejection at:', promise, 'reason:', reason);
});

If that doesn't provide extra information, there may be something you can do with promise and reason to examine them some more.

Unfortunately this approach only works when the error is triggered... so it could be a slow debug cycle.

My ha is setup on docker. No supervisor. HA and NR are independent containers. I just click run nr then it work well. not any issue...

Thank you very much for your reply. I probably understand your idea, but I don't know this programming language. Can you help me describe it in more detail? What should I do? Thank you. Here is my screenshot. Can you give me some guidance?

Yes,it did not restart.. I don't understand why

Add it to the very top of the file - outside of any existing blocks of code. Then restart and wait to see if you get any additional output the next time it happens

Like this right?

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