# Alert but where?

**URL:** https://discourse.nodered.org/t/alert-but-where/59781
**Category:** General
**Created:** [13 March 2022 07:33 UTC](https://discourse.nodered.org/t/alert-but-where/59781 "2022-03-13T07:33:29Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [13 March 2022 07:33 UTC](https://discourse.nodered.org/t/alert-but-where/59781/1 "2022-03-13T07:33:29Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1a49049266db0a65f2c31071cec5b3b4b67907f.png)

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?

---

<div class="post-metadata">

### Author: ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)
#### Post date: [13 March 2022 08:00 UTC](https://discourse.nodered.org/t/alert-but-where/59781/2 "2022-03-13T08:00:52Z")

</div>

Can you share your function before and after?

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [13 March 2022 08:12 UTC](https://discourse.nodered.org/t/alert-but-where/59781/3 "2022-03-13T08:12:45Z")

</div>

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

 ![err2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2ef73eea114493565ceb7d1bb7bc1a2c47047aec.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [13 March 2022 08:21 UTC](https://discourse.nodered.org/t/alert-but-where/59781/4 "2022-03-13T08:21:00Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [13 March 2022 08:39 UTC](https://discourse.nodered.org/t/alert-but-where/59781/5 "2022-03-13T08:39:01Z")

</div>

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 .....

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 March 2022 08:45 UTC](https://discourse.nodered.org/t/alert-but-where/59781/6 "2022-03-13T08:45:34Z")

</div>

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

context.get  
flow.get  
global.get  
☝ These should have only 1 parameter.

context.set  
flow.set  
global.set  
☝ These should have only 2 parameters

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 March 2022 08:48 UTC](https://discourse.nodered.org/t/alert-but-where/59781/7 "2022-03-13T08:48:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [13 March 2022 08:53 UTC](https://discourse.nodered.org/t/alert-but-where/59781/8 "2022-03-13T08:53:13Z")

</div>

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

Thank you .....

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [13 March 2022 11:00 UTC](https://discourse.nodered.org/t/alert-but-where/59781/9 "2022-03-13T11:00:39Z")

</div>

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.

> [@Use of unknown context store in function node error doesn't ref node](https://discourse.nodered.org/t/use-of-unknown-context-store-in-function-node-error-doesnt-ref-node/59788):
>
> The use of an unknown context store in a function node generates a warning (should it be an error?) which does not indicate the node where the error exists. For example, in a Function node, the line let x = context.get("x","31") Shows [image] So it can be difficult to determine where the fault lies. If it is not difficult to improve this then I suggest that would be worth doing. Should I raise an issue?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [13 March 2022 11:29 UTC](https://discourse.nodered.org/t/alert-but-where/59781/10 "2022-03-13T11:29:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [13 March 2022 12:55 UTC](https://discourse.nodered.org/t/alert-but-where/59781/11 "2022-03-13T12:55:15Z")

</div>

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

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

```

and

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

```

This are the only "30" that I found.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [13 March 2022 13:12 UTC](https://discourse.nodered.org/t/alert-but-where/59781/12 "2022-03-13T13:12:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [13 March 2022 13:37 UTC](https://discourse.nodered.org/t/alert-but-where/59781/13 "2022-03-13T13:37:00Z")

</div>

> [@Giamma](#):
>
> `global.get("var_temp_internamin_prec", 30);`

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;`

---

<div class="post-metadata">

### Author: ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)
#### Post date: [13 March 2022 13:44 UTC](https://discourse.nodered.org/t/alert-but-where/59781/14 "2022-03-13T13:44:39Z")

</div>

> [@Giamma](#):
>
> `global.get("var_temp_internamin_prec", 30);`

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

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [13 March 2022 13:50 UTC](https://discourse.nodered.org/t/alert-but-where/59781/15 "2022-03-13T13:50:52Z")

</div>

> [@Giamma](#):
>
> and yes, I am an idiot

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 March 2022 13:59 UTC](https://discourse.nodered.org/t/alert-but-where/59781/16 "2022-03-13T13:59:09Z")

</div>

> [@Colin](#):
>
> we have all had typos like that

Absolutely, but using monaco helps...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8cd32d71696b977e3cde12a2d047b4f55ad0c402.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [13 March 2022 14:12 UTC](https://discourse.nodered.org/t/alert-but-where/59781/17 "2022-03-13T14:12:49Z")

</div>

> [@Steve-Mcl](#):
>
> using monaco helps

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 March 2022 14:14 UTC](https://discourse.nodered.org/t/alert-but-where/59781/18 "2022-03-13T14:14:26Z")

</div>

Yeah, true. 🤫

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [12 May 2022 14:14 UTC](https://discourse.nodered.org/t/alert-but-where/59781/19 "2022-05-12T14:14:28Z")

</div>

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