Help why NR isn't starting

Yeah, I'm pushing the friendship with things recently.

I was going through updating NR on some machines.

Alas one is being annoying - as usual.

I'm getting this error when it starts:

TypeError: Cannot read property '_originalWires' of undefined
    at Subflow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Subflow.js:289:35)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:207:41)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:329: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)
TypeError: Cannot read property '_originalWires' of undefined
    at Subflow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Subflow.js:289:35)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:207:41)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:329: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)

Sorry, but what's happened?
I can't resolve a node that is causing the problem.

All I did was update a few nodes and import a working flow.

WHat did you actually do ?

Show us the NR startup logs so we can see versions etc

What platform and OS version is this running on ?

Craig

Hi @Trying_to_learn

you have hit an error in the internals of Node-RED. I cannot tell you what exactly it is or how it has been caused until I have time to step through the code and figure out what could cause this particular error.

Please let me know exactly what version of Node-RED you are running here.

(Though I see Nick is replying)

OS: Raspbian.
RasPiZW

I had NR installed and working.

I went through and updated some of the nodes which were old and very newer versions exist.

I also imported a small flow (generic) flow which I have on other machines.
This did mean I had to also install a couple of nodes which I didn't have installed - silly me.
(I try to have the same nodes on all machines to avoid this problem)

I deployed it and it just sat there.......

I SSH'ed into it and stopped NR.

I then restarted it and got that error.

Way above my skill set so I'll stop there and ask for help.

NR 1.0.3
(Extra to meet the 9 char minimum)

Need the logs from NR to show versions etc

@Trying_to_learn can you send me your full flow file as a private message? (Click on my photo, then click Message).

I can see what will cause this error, but it should not be possible for a flow to get into this state. If I can examine your flow file it will help me understand it.

Here is the start log from the CLI:

pi@EyeSpyPi:~ $ cd .node-red
pi@EyeSpyPi:~/.node-red $ node-red-start

Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.0.89:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
Started Node-RED graphical event wiring tool.
10 Mar 19:41:18 - [info]
Welcome to Node-RED
===================
10 Mar 19:41:18 - [info] Node-RED version: v1.0.3
10 Mar 19:41:18 - [info] Node.js  version: v10.17.0
10 Mar 19:41:18 - [info] Linux 4.19.66+ arm LE
10 Mar 19:41:26 - [info] Loading palette nodes
10 Mar 19:41:55 - [info] Dashboard version 2.11.0 started at /ui
10 Mar 19:41:55 - [warn] ------------------------------------------------------
10 Mar 19:41:55 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/serialport/build/Release/serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
10 Mar 19:41:55 - [warn] ------------------------------------------------------
10 Mar 19:41:55 - [info] Settings file  : /home/pi/.node-red/settings.js
10 Mar 19:41:55 - [info] HTTP Static    : /home/pi/.node-red/public
10 Mar 19:41:55 - [info] Context store  : 'default' [module=memory]
10 Mar 19:41:56 - [info] User directory : /home/pi/.node-red
10 Mar 19:41:56 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
10 Mar 19:41:56 - [info] Flows file     : /home/pi/.node-red/flows_EyeSpyPi.json
10 Mar 19:41:56 - [info] Server now running at http://127.0.0.1:1880/
10 Mar 19:41:56 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
10 Mar 19:41:57 - [info] Starting flows
TypeError: Cannot read property '_originalWires' of undefined
    at Subflow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Subflow.js:289:35)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:207:41)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:329: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)
TypeError: Cannot read property '_originalWires' of undefined
    at Subflow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Subflow.js:289:35)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:207:41)
    at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:329: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)
10 Mar 19:42:00 - [info] Started flows
10 Mar 19:42:00 - [info] [mqtt-broker:8a5ef823.065db] Connected to broker: mqtt://192.168.0.99:1883
10 Mar 19:42:00 - [info] [mqtt-broker:2aaf8a6b.d7e346] Connected to broker: mqtt://192.168.0.99:1883
10 Mar 19:42:00 - [info] [mqtt-broker:d028257b.41f338] Connected to broker: mqtt://192.168.0.99:1883
10 Mar 19:42:00 - [info] [mqtt-broker:ebc78e73.3c2d3] Connected to broker: mqtt://192.168.0.99:1883
10 Mar 19:42:00 - [info] [mqtt-broker:1f271f30.f42d11] Connected to broker: mqtt://192.168.0.99:1883
10 Mar 19:42:00 - [info] [mqtt-broker:db5ef6f3.10c5d] Connected to broker: mqtt://192.168.0.99:1883

(Sorry not wanting to flood with multiple posts.)

Nick, here's a kicker (rub?):

The flow(s) were too big to send as one.

I tried to .zip them, but that isn't accepted.

I then was going to send you each (only 2) flow one at a time.
Node-Red had to be started in SAFE mode.
Alas while doing that I accidentaly added an unwanted node onto the screen.

Out of habit, I deleted the node and pressed the deploy button.

Now it works.

(There is another very underlying problem) of which I don't want to abuse the offer of help.)

I really REALLY appreciate you offered.

But now it is working.

Do you still want me to post the flow/s?

(ARGH! Got another problem on another machine.
Need to go off line and get that machine looked at with a real screen, etc.)

If it is now working then your flows won't help me understand what probably you were hitting.

But if its working then we can all move on.

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