Ui_table TypeError

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

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)

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 nullis an object there is a check missing, sorry
Chris

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.

Can you share the flow?

Sure, but I will need to trim it first.

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

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.

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