# Ui\_table TypeError

**URL:** https://discourse.nodered.org/t/ui-table-typeerror/23215
**Category:** Dashboard
**Created:** [17 March 2020 07:57 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215 "2020-03-17T07:57:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)
#### Post date: [17 March 2020 07:57 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/1 "2020-03-17T07:57:02Z")

</div>

The below occurs on NR start, when passing in a null payload but with msg.ui\_control set.

Meant to add:  
NR v1.0.4  
Dashboard v2.19.4  
ui\_table v0.3.0

```auto
TypeError: Cannot read property 'config' of null
    at addWidget (/home/pi/.node-red/node_modules/node-red-dashboard/index.js:70:39)
    at Object.addWidget (/home/pi/.node-red/node_modules/node-red-dashboard/index.js:131:48)
    at new TableNode (/home/pi/.node-red/node_modules/node-red-node-ui-table/node.js:57:27)
    at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/util.js:483:31)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:190:48)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:345:33)
    at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30)
    at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4)
    at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4)
    at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13)
    at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19)
    at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9)
    at process._tickCallback (internal/process/next_tick.js:61:11)

```

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [17 March 2020 08:53 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/2 "2020-03-17T08:53:06Z")

</div>

Thank you for the info. There might be an issue.  
Please try to pass msg.ui\_control either without a payload at all or a valid payload (array or object with a command structure). As `null`is an object there is a check missing, sorry  
Chris

---

<div class="post-metadata">

### Author: ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)
#### Post date: [17 March 2020 10:47 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/3 "2020-03-17T10:47:10Z")

</div>

Not exactly sure what is occurring. I have removed msg.ui\_control from the equation. Array is now being sent through to the table on initialisation. However the error remains.

Anyhow, easy fix at the moment is to not restart NR.

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [17 March 2020 10:52 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/4 "2020-03-17T10:52:53Z")

</div>

Can you share the flow?

---

<div class="post-metadata">

### Author: ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)
#### Post date: [17 March 2020 10:55 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/5 "2020-03-17T10:55:24Z")

</div>

Sure, but I will need to trim it first.

---

<div class="post-metadata">

### Author: ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)
#### Post date: [18 March 2020 05:02 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/6 "2020-03-18T05:02:15Z")

</div>

Strange days. I deleted the ui\_table node, then re-instantiated it and deployed. Error is now gone.

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [18 March 2020 07:53 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/7 "2020-03-18T07:53:28Z")

</div>

That to hear. I looked into the code and a test for `msg.payload===null` is indeed missing but should not cause the problems you described.

---

<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: [17 April 2020 07:56 UTC](https://discourse.nodered.org/t/ui-table-typeerror/23215/8 "2020-04-17T07:56:11Z")

</div>

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