Function nodes : Invalid Properties - noerr

Hi Folks, Sorry if already asked (but every post has a 'noerr' and there's nothing in title that matches.

I did a deployment on to a production server from our Dev. The Dev server is fine but on production every single function node has a little orange triangle (adjacent the red triangle location?) when you hover it, the pop-up message is 'Invalid Properties:' and ' - noerr'

The export has noerr as 2 for everything. The interesting thing is, if i drag out a new function node, it's ok (and if I export it says noerr:0), but the first time I open it in the editor, it gets the warning triangle (and subsequently noerr:2).

Node-red version 1.0.3 (same as my dev), npm 6.4.1 IE 11
Thanks for your advice.
Rob

[example inject, function, debug - 2 functions (first is after being opened in node editor and 2nd is before)

[{"id":"ecb3264a.641538","type":"function","z":"10bdc123.d02d9f","name":"","func":"\nreturn msg;","outputs":1,"noerr":2,"x":280,"y":1060,"wires":[["efa5f51a.dd5fc8"]]},{"id":"200d17c0.f5a28c","type":"inject","z":"10bdc123.d02d9f","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":1060,"wires":[["ecb3264a.641538","e05390f9.7b013"]]},{"id":"efa5f51a.dd5fc8","type":"debug","z":"10bdc123.d02d9f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":460,"y":1020,"wires":},{"id":"e05390f9.7b013","type":"function","z":"10bdc123.d02d9f","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":1120,"wires":[["244267c6.9a977"]]},{"id":"244267c6.9a977","type":"debug","z":"10bdc123.d02d9f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":440,"y":1140,"wires":}]

So, to be clear, on which machine did you create this demo export?

If it was on the DEV machine, were the function nodes added from the sidebar of was the one showing the issue copied from an existing function node?

What happens if you create the demo flow on the production machine?

Does it ever happen to function nodes that actually have code in them?

Have you ever tried with a browser other that IE?

@RobC the noerr property is used by the node to track if the JavaScript editor used to edit the node had flagged any errors with the code.

The only way to clear the error is to open the node's edit dialog and address any issues the JavaScript editor highlights.

With the example nodes you've shared (please make sure you format flow json as code using the formatting toolbar in the future so it preserves the formatting) - I can see you have a node with noerr set to 2 but its code doesn't contain any actual errors.

Can you try editing the node in something other than IE11 and see if if clears the error?

It is also important to note that the noerr property is only changed if the node's edit dialog is opened. Just importing a flow won't change that property. So when you say that every single function node as that warning, exactly what steps did take between exporting it from dev to importing it production.

Thanks for your reply zenofmud,
The attached export is from prod, in IE, It was my attempt at creating the most minimal flow that demonstrated the effect.
I dragged 2 inject nodes from the side bar, dragged 2 function nodes and a debug node, wired them up.
I then double-clicked one of the function nodes to edit but made no changes, just closed it. At this point it changed the noerr state to 2, although the json for the two is the same "return msg;"

All of the functions in the project exhibit the same effect, but I'm pretty sure I have opened them in prod at least to eye-ball their code.
They all 'work' (as defined by -'do as expected and pass all module and integration tests' ), the main concern was that I didn't want to hand over something that had the appearance of an error (even if there wasn't).

Cheers,
Rob

Thanks Knolleary,
You confirmed my suspicion with the behavior of noerr - it's just used to maintain state so you can see there's an issue when you log back in to a session I'm guessing. I'm keen to see how that is implemented to see if I can use such a thing to indicate incorrect settings in my custom nodes (but I digress).

I'm not sure how to format the output but I appreciate the advice, I'll try and find out how I do that for future. (is that something in the node-red 'Export' or within this forum?)

I haven't tried anything other than IE, (actually I'm not sure there is another browser, and I'm not at liberty to install something else but I'll definitely chase that down).

I copied the entire flow file from dev, renamed and then updated credentials. I can't recall if they had the error then, but while doing the integration into prod, I'm pretty sure that I opened up the function nodes in the editor at least once (and without making any changes, it generated the error).

The function editor doesn't come up with any icons adjacent any of the js code (like it does when you have a 'real' error).

Is there any other logging or any version differences (machine Java version?) that I should be looking into?

Thanks again for your reply.
Cheers,
Rob

Following your steps, I can not cause the issue, however I am NOT using IE nor have access to it.
What version of node.js are you running? You can find it listed in the node-red start up log.

The version of nodejs is irrelevant here. The behaviour is entirely in the editor and is likely to be an issue with IE and the ACE edit component we use.

I suspected that which is why I originally asked @RobC if he had tried a different browser, but I like to cover all the bases. If he said he was on node.js v4.0 it opens another possible investigation area...

Bingo - port open so connected from a remote Chrome and it's honky dory.
Opened an existing 'error' function, added and removed a space, saved and the triangle goes away.
Open and close the same node from IE (on exactly the same remote session) and it comes back

What can I fetch from IE to help indicate the problem?
Thanks,
Rob

IE is version 11.3441.14393.0
update versions 11.0.170 (KB4534251)

Thanks for confirming. We don't routinely test on IE as it's so old now.

We'd need to narrow down if this is an issue with the ACE edit widget we use (which is out of hands to fix) or more specific to the custom edit mode we use with it. No easy way for you to do that for us.

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