Node-RED 0.20.0 Released

I believe I had done an early beta and then dropped back to 0.19.5 and then updated to 0.20.0

Just took a PiZeroW that was at
Node-RED version: v0.19.5
Node.js version: v10.14.1

and added a function node to it and deployed it (I'd never run NR on it).

I then ran sudo npm install -g --unsafe-perm node-red and it is at
Node-RED version: v0.20.0
Node.js version: v10.14.1

Everything is fine in this Pi

If I had to guess (which at this point I do...) I'd say there is some browser caching going on and it isn't loading the updated CSS for the text editor component.

I don't know it this is related but as soon as I open a function node, this error shows up in the JavaScriot console:
Failed to load resource: the server responded with a status of 404 ()
https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-nrjavascript.js

as for caching, I just tried it in Firefox which hasn't been run in weeks, and it shows the same issue.

Just tried it on both Firefox & Chrome on my Android phone and getting the same thing there.

Kevin - as I mentioned I have tried from Chrome/Firefox/IE and getting garbled text in functions on all. Per your thoughts - within Chrome I cleared all browser settings and tried to access Node-Red after bypassing cache as well and still getting garbled text.

One additional note - I have noticed the editor is acting strange in several ways. Not only garbled text but as you can see in the screen shot below the editor area will display data boxes if you hover over portions of the area as well.

Happy keep continue running this on one server to aid in troubleshooting. But if there doesn't seem to be a resolution soon - is there a means to revert back to 0.19.5? Assume I could uninstall > install 0.19.5 fresh > and import flows. But wondered if there are any simpler fall back methods.

JFI Gone thru every function node on my upgraded PiZero - no sign of any text corruption
I'd previously been on a beta version - just used standard script to upgrade - node.js is version is 8.12

Hi everyone,

I was running 0.19.1 so thought i'd take the plunge and move to 0.20.

I'm running it on ubuntu 18.04.02

The update seem to download and install, but now nodered crashes on boot and the reloads and tries again.

Mar 13 07:27:00 server01 node-red[30382]: 13 Mar 07:27:00 - [info] Node-RED version: v0.20.0
Mar 13 07:27:00 server01 node-red[30382]: 13 Mar 07:27:00 - [info] Node.js version: v8.10.0
Mar 13 07:27:00 server01 node-red[30382]: 13 Mar 07:27:00 - [info] Linux 4.15.0-46-generic x64 LE
Mar 13 07:27:01 server01 node-red[30382]: 13 Mar 07:27:01 - [info] Loading palette nodes
Mar 13 07:27:01 server01 node-red[30382]: 13 Mar 07:27:01 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
Mar 13 07:27:01 server01 node-red[30382]: 13 Mar 07:27:01 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [info] Settings file : /home/pi/.node-red/settings.js
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [info] Context store : 'default' [module=memory]
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [info] User directory : /home/pi/.node-red
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [info] Flows file : /home/pi/.node-red/flows_server01.json
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [info] Server now running at https://127.0.0.1:1880/
Mar 13 07:27:06 server01 node-red[30382]: 13 Mar 07:27:06 - [warn]
Mar 13 07:27:06 server01 node-red[30382]: ---------------------------------------------------------------------
Mar 13 07:27:06 server01 node-red[30382]: Your flow credentials file is encrypted using a system-generated key.
Mar 13 07:27:06 server01 node-red[30382]: If the system-generated key is lost for any reason, your credentials
Mar 13 07:27:06 server01 node-red[30382]: file will not be recoverable, you will have to delete it and re-enter
Mar 13 07:27:06 server01 node-red[30382]: your credentials.
Mar 13 07:27:06 server01 node-red[30382]: You should set your own key using the 'credentialSecret' option in
Mar 13 07:27:06 server01 node-red[30382]: your settings file. Node-RED will then re-encrypt your credentials
Mar 13 07:27:06 server01 node-red[30382]: file using your chosen key the next time you deploy a change.
Mar 13 07:27:06 server01 node-red[30382]: ---------------------------------------------------------------------
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] Starting flows
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Main Screen] LOG PINS ["0"]
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Main Screen] Start connection:
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Bathroom] LOG PINS ["0"]
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Bathroom] Start connection:
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Data Screen] LOG PINS ["0"]
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Data Screen] Start connection:
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Lexi] LOG PINS ["0"]
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [blynk-ws-client:Lexi] Start connection:
Mar 13 07:27:07 server01 node-red[30382]: 13 Mar 07:27:07 - [info] [inject:5 Secs] repeat = 5000
Mar 13 07:27:08 server01 node-red[30382]: <--- Last few GCs --->
Mar 13 07:27:08 server01 node-red[30382]: [30382:0x55c7292971f0] 7760 ms: Mark-sweep 131.0 (151.1) -> 130.3 (157.6) MB, 169.0 / 0.0 ms allocation failure GC in old space requested
Mar 13 07:27:08 server01 node-red[30382]: [30382:0x55c7292971f0] 7922 ms: Mark-sweep 130.3 (157.6) -> 130.2 (142.6) MB, 161.7 / 0.0 ms last resort GC in old space requested
Mar 13 07:27:08 server01 node-red[30382]: [30382:0x55c7292971f0] 8079 ms: Mark-sweep 130.2 (142.6) -> 130.2 (142.6) MB, 157.3 / 0.0 ms last resort GC in old space requested
Mar 13 07:27:08 server01 node-red[30382]: <--- JS stacktrace --->
Mar 13 07:27:08 server01 node-red[30382]: ==== JS stack trace =========================================
Mar 13 07:27:08 server01 node-red[30382]: Security context: 0x21c879898fe1
Mar 13 07:27:08 server01 node-red[30382]: 1: generateCache(aka generateCache) [/usr/local/lib/node_modules/node-red/node_modules/mqtt-packet/numbers.js:~15] [pc=0x3967b8cfe33d](this=0x21c879882241 )
Mar 13 07:27:08 server01 node-red[30382]: 2: writeToStream(aka generate) [/usr/local/lib/node_modules/node-red/node_modules/mqtt-packet/writeToStream.js:24] [bytecode=0x2ded846651e9 offset=41](this=0x197b2c637649 ,packet=0x2313cbec7fc1 ...
Mar 13 07:27:08 server01 node-red[30382]: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Mar 13 07:27:08 server01 node-red[30382]: 1: node::Abort() [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 2: 0x55c727b45c91 [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 3: v8::Utils::ReportOOMFailure(char const*, bool) [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 5: v8::internal::factory::NewUninitializedFixedArray(int) [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 6: 0x55c727734fb6 [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 7: 0x55c72773525f [node-red]
Mar 13 07:27:08 server01 node-red[30382]: 8:
Does anyone know how i fix this.

Regards

Paul

Nick, the docker build by default is on Node 6 - which v0.20 doesnt like. I had to use the V8 tag to get it to work.

Also, when a Tab is disabled, I get three symbols - is that intended or should it just be one (preferred!)

image

Actually, if I just disable a tab that was enabled, I do not get the symbol....except the ones that originally had three.

If I copy the nodes from a tab that has three symbols and paste it to a new tab, it behaves correctly (1 symbol)

Strange!

I wonder if I export the flows, delete everything and then reimport would it work correctly (or use projects)...

NOOOOOO! Projects makes it worse!.

Also noticed that When I create a new project, I get a project loaded message 3 times

==========
Had to restore flows from backup (make sure you keep backups folks!) and go back to 0.19.6 for the time being

Ok, I don't know what i did to fixit.

Booted into nodered --safe and removed some unused nodes.

This looks to have solve the issue.

Spoke too soon. It's werid if i run from the command line, it works ok, if i start it with service node-red start it gives me the errors above.

Solved.

In /etc/systemd/system/node-red.service i changed

ExecStart=/usr/local/bin/node-red-pi --max-old-space-size=128 -v

to

ExecStart=/usr/local/bin/node-red-pi --max-old-space-size=1024 -v

Regards

Paul

That is really odd. The file it is trying to load is indeed the mode file for the Function node editor - and it failing to load could cause all sorts of problems.

What I can't explain is why it's trying to load it from CloudFlare CDN rather than your Node-RED install.... that is really really odd. Where is your Node-RED install relative to where you are accessing it from?

@scarruthers can you check your browser console log for any similar errors? Downgrading to 0.19.5 is simple enough... just depends how you installed 0.20.0 - lets us know that and we can give you directions for downgrading.

@spants ooops - that slipped through the net. Will publish fixed images today.

when I run which node-red I get /usr/local/bin/node-red
my User directory : /Users/Paul/.node-red

Is that what you want?

It's quite possible I messed something up back a bit. I had installed an early v0.20.? beta and something messed up so I tried to go backto 0.19.5 and had all kinds of trouble. If I remember I had to manually go and delete node files and completely reinstall node.js but it has been woking fine since this upgrade.

Just updated my Win10 setup - all seems to be OK :slight_smile:

Just tried a fresh install of NODE-RED rather than using the update script, still getting the corrupted contents in the edit box of function modes. It's a display issue as they still work.

Can you check your browser's developer console for any error messages?

Got this when I edited a working function box.

I also see those ace.js warnings

However on my PiZeroW with node-red 0.20.0 I do not see them

Kevin -

To install 0.20.0 - these steps were followed:

-Had been running on 0.19.5 for some time and believe was the initial install

-Used the following command with the latest option to upgrade to 0.20.0 yesterday. I did not install any of the beta versions for 0.20.0 prior so straight 0.19.5 to 0.20.0 yesterday. npm install -g --unsafe-perm node-red

-I am on a Windows 10 workstation during development and is where I have the garbled text issue on 0.20.0 across Chrome/Firefox/IE

I just did npm install -g --unsafe-perm node-red@0.19.6 then used the update script and my problem has gone!

Upgrade isn't working on one PiZero - after running standard upgrade script - if I say node-red-start it says its not completely installed and offers to do again.

[edit]Wiped the card and re-installed - all OK[/edit]