Unexpected Node Error

Hi all, I am getting the following error into the syslog of the raspi where nodered is running.
It is suggested to report the error on github, but before thronging there, I would like to ask here:

Oct 05 08:17:34 houston Node-RED[658]: 5 Oct 08:17:34 - [error]
Oct 05 08:17:34 houston Node-RED[658]: ********************************************************************
Oct 05 08:17:34 houston Node-RED[658]: Unexpected Node Error
Oct 05 08:17:34 houston Node-RED[658]: ********************************************************************
Oct 05 08:17:34 houston Node-RED[658]: Info:
Oct 05 08:17:34 houston Node-RED[658]:  Node object is not a node-red Node
Oct 05 08:17:34 houston Node-RED[658]: Stack:
Oct 05 08:17:34 houston Node-RED[658]:  Error: Invalid payload type (undefined): expected number, boolean, string
Oct 05 08:17:34 houston Node-RED[658]:     at log_helper (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:512:20)
Oct 05 08:17:34 houston Node-RED[658]:     at Node.error (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:553:9)
Oct 05 08:17:34 houston Node-RED[658]:     at parsePayload (/home/rob/.node-red/node_modules/node-red-contrib-moving-average/moving-average.js:49:1>
Oct 05 08:17:34 houston Node-RED[658]:     at MovingAverageNode._inputCallback (/home/rob/.node-red/node_modules/node-red-contrib-moving-average/mo>
Oct 05 08:17:34 houston Node-RED[658]:     at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
Oct 05 08:17:34 houston Node-RED[658]:     at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
Oct 05 08:17:34 houston Node-RED[658]:     at MovingAverageNode.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/>
Oct 05 08:17:34 houston Node-RED[658]:     at MovingAverageNode.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/>
Oct 05 08:17:34 houston Node-RED[658]:     at MovingAverageNode.Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nod>
Oct 05 08:17:34 houston Node-RED[658]:     at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.>
Oct 05 08:17:34 houston Node-RED[658]: Please report this issue, including the information logged above:
Oct 05 08:17:34 houston Node-RED[658]: https://github.com/node-red/node-red/issues/
Oct 05 08:17:34 houston Node-RED[658]: ********************************************************************

Thank you for helping out

To me I would uninstall this node and see what happens then.

It may require a restart.

Sorry if this seems a bit severe.

Do you have much of a flow?

It looks like this :point_up: node it not sending a correct msg object. That is a bug in itself and you should report your findings to the author via the GitHub issues.

That said, this bug may be unearthed due to what you are feeding into it? Put a debug node before this node and see what values cause it to error.

I have put a debug node on the output of the moving average node and I get no errors

10/6/2023, 11:40:36 AMnode: debug 1
msg : Object
object
payload: 9.164227450980388
_msgid: "be5f556b7d020a5f"
payload_in: 6.09

This node hasn't been updated in over 2 years.

This is a known issue with the node and was reported over a year ago with no response from the node's author, however there is a 'get around' provided by another user.

You might want to try this node instead:

1 Like

Why?

I said

Which as it turns out is exactly the problem we would have discovered as @zenofmud has linked to.

Sorry Steve-Mcl, I initially misread your advice. :thinking:
I then placed the debug before and saw that the topic was undefined, so gave a value to it and the error seems to be gone.
Thank you so much :grinning:

Hi Zenofmud, I checked that the input was a number and it always was then, as wrote to Steve-Mcl, I saw that the topic was undefined and gave it a value.
Thanks for pointing me to the new moving-average node, I will definitely give it a try.

Thank you so much :grinning:

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