# Node: msg.payload msg.payload : undefined

**URL:** <https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380>\
**Category:** General\
**Tags:** opcua\
**Created:** [2 April 2025 09:56 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380 "2025-04-02T09:56:30Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![lidia](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lidia](https://discourse.nodered.org/u/lidia)\
**Post date:** [2 April 2025 09:56 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/1 "2025-04-02T09:56:30Z")

</div>

Hi, I'm testing node red and I've created a signal called data from the prosys server, and I've connected it to this client, but I don't know why it doesn't read the number value. It detects the message but tells me: node: msg.payload msg.payload: undefined, so the value doesn´t appear in the client, as you can see in the following picture.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1ac082faba9b5d66f1337f977c69a5625a7fde.png)  
It also appears a warning saying: msg : string[26]  
"userIdentity is ANONYMOUS ", and I don´t understand why because when I created the OPC UA Client in node red, I didn´t put the anonymous clicked as you can see, and in the prosys neither.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e3618ec17c01e3e21eeb7346768da63bb8014ea3.png)

I´ve tried in UaExpert which is another different cliet, and in that client it works and appears the value and it updates itself every time, so I guess it´s a node red problem.

Thank you in advance, I´m really new so I don´t know how to fix it

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [2 April 2025 10:06 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/2 "2025-04-02T10:06:34Z")

</div>

Welcome to the forum @lidia.

Try changing your debug node to show the complete message object. There may be clues in the overall message structure.

I don't know where the warning comes from, but if `msg` is a string as it says, `msg.payload` is indeed undefined.

---

<div class="post-metadata">

**Author:** ![lidia](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lidia](https://discourse.nodered.org/u/lidia)\
**Post date:** [2 April 2025 11:44 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/3 "2025-04-02T11:44:36Z")

</div>

Thanks,i did what you say about showing the complete message and it appears this: {"error":null,"endpoint":"opc.tcp://ESVLCP-13KVW33.CorpDSB.com:53530/OPCUA/SimulationServer","status":"active reading","\_msgid":"bccd989d863a8c11"} ?????

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [2 April 2025 11:57 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/4 "2025-04-02T11:57:29Z")

</div>

So there is no msg.payload.

Look in the documentation for your opcua nodes.  
There may be something significant in the client node having 3 outputs while you are only wired up to the centre one.

---

<div class="post-metadata">

**Author:** ![lidia](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lidia](https://discourse.nodered.org/u/lidia)\
**Post date:** [4 April 2025 06:10 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/5 "2025-04-04T06:10:00Z")

</div>

I did it like that because of this video: [OPC UA - Initiation - Les bases pour débuter avec Démo PROSYS Simulation / UA-EXpert / Node-RED](https://www.youtube.com/watch?v=iN4qKm5W35g&t=1160s) , and it works for him tha´s why I´m confused it should be working

---

<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:** [4 April 2025 06:36 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/6 "2025-04-04T06:36:43Z")

</div>

Read the side bar built in help - what does it say about the outputs? Alternately, add full debug nodes to all the outputs and see what you get?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [4 April 2025 06:51 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/7 "2025-04-04T06:51:32Z")

</div>

The opcua client node in that video only has one output, yours has 3, it may be from a different set of contributed nodes.

Looking at [Library - Node-RED](https://flows.nodered.org/search?term=opcua&type=node&type=flow&type=collection&sort=downloads), there are a few opcua nodes but by far the most popular seems to be node-red-contrib-opcua.  
Which nodes did you install?

And as Steve says, connect all 3 outputs to debug nodes to scrutinise the outputs.

---

<div class="post-metadata">

**Author:** ![Chalermrattam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chalermrattam/32/100324_2.png) [@Chalermrattam](https://discourse.nodered.org/u/Chalermrattam)\
**Post date:** [21 April 2025 14:35 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/8 "2025-04-21T14:35:00Z")

</div>

Did you solve the problem? I have the same problem.

---

<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:** [21 April 2025 14:38 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/9 "2025-04-21T14:38:20Z")

</div>

Hi & welcome.

You would be better off starting a new thread and referencing back to this one.

Please include things like your Node-RED version, the "OPC UA" Nodes and their version etc.

Screenshots might help too.

---

<div class="post-metadata">

**Author:** ![Chalermrattam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chalermrattam/32/100324_2.png) [@Chalermrattam](https://discourse.nodered.org/u/Chalermrattam)\
**Post date:** [21 April 2025 14:50 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/10 "2025-04-21T14:50:39Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/5/75d87a5008301bec893f4c519f266482ef10e442.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0ab5321ba66cb1280a9a40bdd5c6d387c138bf67.png)

---

<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:** [21 April 2025 14:54 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/11 "2025-04-21T14:54:36Z")

</div>

OK, and the OPC UA nodes you are using and the version of them? (check your Node-RED palette manager)

And a screenshot of your flow (including the node that is causing the error)?

---

<div class="post-metadata">

**Author:** ![Chalermrattam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chalermrattam/32/100324_2.png) [@Chalermrattam](https://discourse.nodered.org/u/Chalermrattam)\
**Post date:** [21 April 2025 15:00 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/12 "2025-04-21T15:00:59Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1babe3a11dead8e8e29f4d6cde516ea2f4df2e01.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9f171dd6de11e3b60f83c23cf09c2a0708a4b7e0.png)

---

<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:** [21 April 2025 15:06 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/13 "2025-04-21T15:06:56Z")

</div>

And what do you see if you add debug nodes to output pins 1 and 3?

---

<div class="post-metadata">

**Author:** ![Chalermrattam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chalermrattam/32/100324_2.png) [@Chalermrattam](https://discourse.nodered.org/u/Chalermrattam)\
**Post date:** [21 April 2025 15:08 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/14 "2025-04-21T15:08:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/a/2ab02d4c27e79d3af69e02a4e42cb505cff8ef0d.png)  
oh ty very much

---

<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:** [20 July 2025 15:09 UTC](https://discourse.nodered.org/t/node-msg-payload-msg-payload-undefined/96380/15 "2025-07-20T15:09:22Z")

</div>

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