TypeError: Cannot read property 'config' of null

Hello,

Each time I run the program that I have done, it works but node-red shows me the following error 3 times: TypeError: Cannot read property 'config' of null

Do you know what can I do?

click the number in gray after node: xxxxx.yyyyy
image

does it take you to a specific node?

If not, copy the gray number and search it in node-red using CTRL + F

Once you find what node it is from, you can find it in the flows library and then look on its repository for known issues.

1 Like

Also check any values you have entered in its configuration.

Yes! It shows me the nodes I have marked. They belonged to a Group that I have disabled (I don't think that's the problem):

Stick a debug node (set to dsplay the complete msg object) on each of the functon nodes and link-in nodes to see what is being passed to the switch.

then you should be able to see what is in the msgs.

I have done this, but they don't show me anything:

I can pretty much guarantee if the error links to them nodes, then they are the problem. What is the full name of this type of node?

So let me see if I understand.

  1. When you click on one of the node id's in the debug panel, it hi-lights one of the three switch nodes...correct?
  2. afterr adding the debug nodes and deploying the errors show up but nothing in the debug panel from the debug nodes.

I'd like you to try three more things

  1. change the debug node panel option from all nodes to current flow
    Screen Shot 2021-06-21 at 12.35.53 PM
  2. add a catch node to the flow tab and attach it to a debug node (set to display the complete msg object) and test it.
  3. after testing if you still get the error, disable the nodes and try again.

Please stop node-red and start it again in a terminal. Then copy/paste the terminal output here, from the start to where it shows the errors.

Isn't this the telling bit of information? If they are UI nodes that expect to be in a group and you've disabled the group, then it would appear those nodes don't handle "not being in a group" very well.

What more information is needed from the startup log? What we really need to know is, as Steve asked, exactly what type of nodes are they? Are they the normal Node-RED Dashboard Switch nodes, or a contrib node?

The log will show the versions of stuff. One possibility is that it is an old dashboard version (I seem to remember a fix for this some time ago). Alternatively I think the log is likely to show which node is failing. I suspect it may be the ui-led nodes.

I can confirm that the ui-led node generates a similar error in the log if the group it is in is disabled.

TypeError: Cannot read property 'config' of null
    at new LEDNodeConstructor (/home/colinl/.node-red/node_modules/node-red-contrib-ui-led/dist/nodes/ui_led/ui_led.js:25:44)
    at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:86:27)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:205:48)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:371:33)

Interestingly, though, this does not appear in the debug pane (node red 1.3.5, dashboard 2.29.1, ui-led 0.4.9). I have submitted an issue on the node. LED node does not handle being in a disabled group - Cannot read property config of null · Issue #80 · Adorkable/node-red-contrib-ui-led · GitHub

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