Alert but where?

Good morning and good Sunday ....
I have one timer at 00.01 that perform some function node and link out node.

Yesterday I modified this function and this morning I found this alert in debug section ...

err

There's no reference to a specific node and so I don't know what to do because
all the function have worked fine ...

Can you help me?

Can you share your function before and after?

It's a problem because are a lot of functions ....

You said you changed a function, or were you using the word function generically rather than to a Function node?
I haven't seen that error but it suggests that a context/flow/global get or set is specifying an illegal context store. Are you using a context store other than the default? If not then you probably have an extra parameter in one of the get or set calls.

Sorry,
I wrote "Yesterday I modified this function" but it's not a specific function but "some function" and those functions works fine .....
No, I don't use an other context store than the default .....

Open every function node & inspect every line with ...

context.get
flow.get
global.get
:point_up: These should have only 1 parameter.

context.set
flow.set
global.set
:point_up: These should have only 2 parameters

Additionally, if you use Monaco (setting in settings.js) it has MUCH better code completion, snippet, error highlighting & function parameter help - that would tell you how to use content properly

Ok, I'll check all my functions one more time, this afternoon with more calmly ...

Thank you .....

I have started a fresh thread in the development category to ask if the error message can be improved to include the node id, so that others will not have the problem.

1 Like

If you search your flows for "30") or '30') or 30), you may well find the offending node.

2 Likes

Yes, it's first thing that's what I did and I found ....

global.set("var_temp_esternamin_prec", 30);
global.get("var_temp_internamin_prec", 30);

and

var y = global.get("var_temp_internamin_prec")||30;

This are the only "30" that I found.

Maybe you should read this part of the documentation;
https://nodered.org/docs/user-guide/writing-functions#storing-data
And see if that helps you figure it out.

That's the one causing the problem. The second argument of get() is the context store. Compare that with the other one you showed

var y = global.get("var_temp_internamin_prec")||30;

1 Like

SET not GET !!!!
and yes, I am an idiot !!!!
Sorry .....

No, we have all had typos like that where the brain sees what it thinks is there, not what is actually there.

Absolutely, but using monaco helps...

1 Like

I agree, but of course had it been
global.get("var_temp_internamin_prec", "30")
then even monaco would not have helped.

Yeah, true. :shushing_face:

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