All nodes are "invisible" after an update of Node.js and Node-RED

#1

Hello,
yesterday I had to reinstall my Node.js because some dependencies to node-gyp and semver were broken. Also my Node-RED was outdated (0.18.4). So I did the following steps:

  • Upgrade Node-RED to 0.18.5
  • Remove Node.js, node-gyp and semver
  • Install Node.js 8.11.1, node-gyp and semver

Since then I have the following problem:

  • All nodes in the Node-Red editor are “invisible”. The tabs with the flow names are still there!

I watched the file, were the flows are stored (~/.node-red/flows_raspihub.json) and the content seems to be fine. I also restored several saved versions of the file. No matter, I cannot see my nodes.

The log doesn’t help me either:

Mai 15 06:07:03 raspihub systemd[1]: Starting Node-RED graphical event wiring tool....
Mai 15 06:07:03 raspihub systemd[1]: Started Node-RED graphical event wiring tool..
Mai 15 06:07:11 raspihub Node-RED[397]: 15 May 06:07:11 - [info]
Mai 15 06:07:11 raspihub Node-RED[397]: Welcome to Node-RED
Mai 15 06:07:11 raspihub Node-RED[397]: ===================
Mai 15 06:07:11 raspihub Node-RED[397]: 15 May 06:07:11 - [info] Node-RED version: v0.18.5
Mai 15 06:07:11 raspihub Node-RED[397]: 15 May 06:07:11 - [info] Node.js  version: v8.11.1
Mai 15 06:07:11 raspihub Node-RED[397]: 15 May 06:07:11 - [info] Linux 4.9.35-v7+ arm LE
Mai 15 06:07:13 raspihub Node-RED[397]: 15 May 06:07:13 - [info] Loading palette nodes
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:35 - [info] Settings file  : /root/.node-red/settings.js
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:35 - [info] User directory : /root/.node-red
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:35 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:35 - [info] Flows file     : /root/.node-red/flows_raspihub.json
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:35 - [info] Server now running at http://127.0.0.1:1880/
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:35 - [warn]
Mai 15 06:07:35 raspihub Node-RED[397]: ---------------------------------------------------------------------
Mai 15 06:07:35 raspihub Node-RED[397]: Your flow credentials file is encrypted using a system-generated key.
Mai 15 06:07:35 raspihub Node-RED[397]: If the system-generated key is lost for any reason, your credentials
Mai 15 06:07:35 raspihub Node-RED[397]: file will not be recoverable, you will have to delete it and re-enter
Mai 15 06:07:35 raspihub Node-RED[397]: your credentials.
Mai 15 06:07:35 raspihub Node-RED[397]: You should set your own key using the 'credentialSecret' option in
Mai 15 06:07:35 raspihub Node-RED[397]: your settings file. Node-RED will then re-encrypt your credentials
Mai 15 06:07:35 raspihub Node-RED[397]: file using your chosen key the next time you deploy a change.
Mai 15 06:07:35 raspihub Node-RED[397]: ---------------------------------------------------------------------
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:36 - [info] Starting flows
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:36 - [warn] [modbus-client:garage] Client -> reconnect in 2000 ms Serial@/dev/ttyModbus0:19200bit/s default Unit-Id: 1
Mai 15 06:07:35 raspihub Node-RED[397]: 1526366976445 Available Firmata  
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:36 - [info] [inject:de7e3054.1d091] repeat = 3000
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:36 - [info] [inject:a08153a0.d174b] repeat = 60000
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:37 - [info] [inject:21 Uhr] crontab = 00 21 * * *
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:37 - [info] [inject:e75f9e69.50b72] repeat = 60000
Mai 15 06:07:35 raspihub Node-RED[397]: ac:63:be:33:21:5f
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:37 - [info] Started flows
Mai 15 06:07:35 raspihub Node-RED[397]: 1526366978145 Connected Firmata  
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:38 - [info] serial port /dev/ttyWind opened at 57600 baud 8N1
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:38 - [info] [mqtt-broker:b6c4baa4.adbf78] Connected to broker: raspihub@mqtt://odroid.fritz.box:1883
Mai 15 06:07:35 raspihub Node-RED[397]: 15 May 06:07:42 - [info] [nodebot:firmata0] io ready

One very strange thing: It seems, that all the flows are working! I can see the output that Node-RED is pushing via MQTT.
But why I can’t see them?

Today I reinstalled Node-RED and all additional npm modules I’m using. But that hasn’t improved anything either.
Can anybody please help me?

P.S.
I didn’t changed my hostname.

0 Likes

#2

Are there any errors in your browser console? Hit F12 and click the console tab then refresh the page.

0 Likes

#3

How did you upgrade to node8 ? did you use our upgrade script as per the docs ?
I see you are running as root as well which is generally not the way to go so it may all be a bit messed up.
After the upgrade - did you go into the user directory and do an npm rebuild which should rebuild any nodes that have a binary dependancy .

but yes a bit weird - the logs as posted do look basically ok.
Is there anything in the browser developer/console log ?

0 Likes

#4

Because I need this system or at least the flows I switched back to node-red@0.18.3 - without touching my additional nodes. And voila everything is fine again.

For you I jumped forward to 0.18.5 again for testing. And see the same result as before. No nodes visible. The browser console shows an error:

red.min.js:16 Uncaught ReferenceError: wireClippedNodes is not defined
    at Object.l [as import] (red.min.js:16)
    at Object.success (main.min.js:16)
    at j (vendor.js:2)
    at Object.fireWith [as resolveWith] (vendor.js:2)
    at x (vendor.js:5)
    at XMLHttpRequest.b (vendor.js:5)

Perhaps that is the issue. I have seen this error before. I got the same error when I wanted to import the flows from this machine on another machine. It has something to do with this node: node-red-contrib-modbus
But I don’t know what.

How did you upgrade to node8 ? did you use our upgrade script as per the docs ?

I have not upgraded. I have only removed node8 and installed it back again. I think it has something to do with the Node-RED version.

I see you are running as root as well which is generally not the way to go so it may all be a bit messed up.

I know. My new machine is still running with clean installation and an own nodered user. :wink:

After the upgrade - did you go into the user directory and do an npm rebuild

I removed the node_modules folder and did a npm install. Should do the same.

0 Likes

#5

With node-red@0.18.4 it also works fine. So it has to be something with 0.18.5.

0 Likes

#6

Ah yes, the clipped nodes error has been fixed in git and we’ll publish 0.18.6 this week.

1 Like