Could someone help me with this error?

More to the point:
Which node?

Normally errors are caught and I get a message telling me which node, etc.

This doesn't have any of the usual stuff like that.

{"message":"TypeError: Cannot read property 'split' of undefined","source":{"id":"3211755c.fcfaf2","type":"string","name":"- to /","count":1},"stack":"TypeError: Cannot read property 'split' of undefined\n    at S.replaceAll (/home/pi/.node-red/node_modules/string/lib/string.js:374:22)\n    at executeFunctionByName (/home/pi/.node-red/node_modules/node-red-contrib-string/string/string.js:49:38)\n    at /home/pi/.node-red/node_modules/node-red-contrib-string/string/string.js:72:29\n    at Array.forEach (<anonymous>)\n    at string._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-string/string/string.js:56:30)\n    at string.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:199:18)\n    at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:179:33)\n    at runCallback (timers.js:705:18)\n    at tryOnImmediate (timers.js:676:5)\n    at processImmediate (timers.js:658:5)"} ERR...

I shall look, but as a Plan B, help may be needed/appreciated.

Ok, found the originating node, buy why is it in this format and not the usual format?
(Source node: 3211755c.fcfaf2)


{"message":"ReferenceError: a is not defined (line 1, col 19)","source":{"id":"8e325c36.e50958","type":"function","name":"This will throw an error","count":1}}

Hi @Trying_to_learn

where are you copying that JSON from exactly?

I'm struggling to see the difference between the two examples. They both have a source property that gives you the node's id, name and type. In the first example that "doesn't have any of the usual stuff", it has all the usual stuff:

"source": {"id":"3211755c.fcfaf2","type":"string","name":"- to /","count":1}

In the second example:

"source":{"id":"8e325c36.e50958","type":"function","name":"This will throw an error","count":1}

I won't say my usual "sorry" here, as I am trying to break the habit.

Today (earlier) I turned on this machine and logged into my RasPi's Node-Red page.

I was shown an error had occurred so I looked at my error page.
Yes, not the best designed page, so I then went to the edit window instead.

The message I posted was displayed in the debug window - right side of the screen as just plain text.

Usually when an error happens I see the structure in the debug window (example now)

Screenshot from 2020-03-20 22-09-24

What I saw was the entire column full of text - top to bottom of screen.
No structure at all.

No screen shot. Silly me.

I have an error catching flow for each flow and so I invoked it. Got the same output.
No structure.

Yet, the example I just posted is how they usually appear.

The problem - after I found the source id - was tracked to a switch node which was doing (or trying to do) something to a message's property that didn't exist.
I had been on a quest getting rid of older/bad/poorer code for dates/time stamps and replacing them with my new sub-flow timestamp node.

Knowing the problem I could put the node back to how it was and try to force the error to happen again if you want, but I don't want to waste your time.

It was just I didn't get why the structure was missing from the error.

Do you want me to invoke the error again and show the screen shot?

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