Msg object got deleted

I have thousands of elements in my array and used split to effectively traverse it in multiple messages with split array in it. Then I traverse it in a loop, but my problem is it randomly triggers this error message:
"ReferenceError: msg is not defined"

Somehow and somewhere in the flow the msg object got deleted? Is that even possible?
How can I even trace it where it happened?

Which node is 990b4810.3b2ff8 ? Is that the Split node? In your screenshot I can see the msg.items node (whose icon I don't recognise) is highlighted.

Any errors in the node-red log output?

990b4810.3b2ff8 is the msg.items that's a loop node.

You'll have to to be a bit more specific as that isn't a core node - which module does it come from?

image

If you click the 'show more' button it will tell us what module it came from.

image

Maybe @s1r-J can help as the author of that node.

This node does not "synchronized".
While one array is in loop processing, another array can initialize the node.
This is why the error occurs.

@knolleary @s1r-J
I found out the culprit. There's a node somewhere in my subflows that initialized the msg.

Thanks guys!

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