Raspberry PI3 Nodered launch error

I have problem with my node-red in RPI3.

Why always gives an error, The error log is

29 Oct 21:38:57 - [info] Starting flows
TypeError: Cannot read property 'config' of null
at addWidget (/home/pi/.node-red/node_modules/node-red-dashboard/index.js:63:39)
at Object.addWidget (/home/pi/.node-red/node_modules/node-red-dashboard/index.js:115:20)
at new ListNode (/home/pi/.node-red/node_modules/node-red-contrib-ui_list/ui_list.js:79:27)
at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:305:18)
at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:89:35)
at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:328:29)
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 _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

what version of Node-red, nodejs and dashboard are you running?

Node-RED version: v0.19.4
[info] Node.js version: v8.11.1
[info] Linux 4.14.78-v7+ arm LE
[info] Dashboard version 2.10.1 started at /ui

What happens if you start Node-RED with a new flows file?

copy your current flows file into a different directory and then restart Node-RED

Problem is that node-red never start, if node-red start after deployment again stopping, and waiting always.
So dont make a copy or move a copy

Delete the module node-red-contrib-ui_list as it is causing the issue. You can do that by running npm remove node-red-contrib-ui_list in the directory ~/.node-red/.

A question then from @dceejay and @nisiyama as to what could cause this error.

I did uninstall but same again.

29 Oct 22:18:30 - [info] Starting flows
TypeError: Cannot read property 'config' of null
at addWidget (/home/pi/.node-red/node_modules/node-red-dashboard/index.js:63:39)
at Object.addWidget (/home/pi/.node-red/node_modules/node-red-dashboard/index.js:115:20)
at new ListNode (/home/pi/.node-red/node_modules/node-red-contrib-ui_list/ui_list.js:79:27)
at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:305:18)
at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:89:35)
at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:328:29)
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 _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
29 Oct 22:18:31 - [info] Started flows
29 Oct 22:18:31 - [info] Server now running at http://127.0.0.1:1880/

Can you see /home/pi/.node-red/node_modules/node-red-contrib-ui_list is mentioned in that stack trace? That tells me you haven't removed it... The module is still there.

What command did you run to remove that module and in what directory did you run it?

I started this command but when I looked node_modules, ui_list is still there.

May I delete it manually ?

2 Likes

I asked what command you ran and what directory you ran it in. I want to make sure you ran what I said to run in the right directory - because if you had done so, it would have removed the module.

If you really doesn't work, then delete the /home/pi/.node-red/node_modules/node-red-contrib-ui_list directory manually.

The reason of the error seems that the belonging group of ui_list is not configured in node settings panel.

conf

I think the error will disappear if it is configured.
But it would be better for error handling to be performed more appropriately. Will make PR on this.

Umm shouldn't node-red-contrib-ui_list be coded such that this isn't a problem??

1 Like

Yes... which is why @Nisiyama said:

@knolleary I may have assumed wrongly, I thought he was going to create a PR against NR itself.

Since he is the creator of the node-red-contrib-ui_list node, I didn't think he would need a PR to add code to his new node to prevent this situation.

Hi, all
Released new version of ui_list node with error handling of Dashboard group configuration .

Though yes we should probably look to see if the core can help prevent this if at all possible. We’ve only just started to allow extra dashboard widgets so we are finding out as we go.