Node-RED 0.20.7 released

Hi,

Here's a quick 0.20.7 release to start the weekend.

  • Update jsonata to 1.6.5 which should fix #2183
  • Ensure the subflow stop promise is waiting for before restarting
  • Properly escape node types in palette

This includes a fix for the issue people were hitting when they tried to drag nodes out of the palette and also fixes a timing issue with stopping subflows.

We've also updated the bcrypt dependency to the latest version so we should install cleanly on Node 12 again.

Enjoy

11 Likes

Hi,

Is there a known issue (yet) with timers/delays in 0.20.7? I upgraded earlier and my log file is a solid mountain of:

(node:1192) TimeoutOverflowWarning: 3124648168 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.

I'm not using setInterval(), timers, delays, or any timing things like that, this is a program that has been running for about a month with no issues.

Everything is fine until the editor is brought up in a browser, then it's nonstop:

Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740465 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740443 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740427 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740420 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740412 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740403 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740390 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740380 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740353 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740344 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740334 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740328 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740310 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1184) TimeoutOverflowWarning: 3123740286 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.

The problem persists until Node-RED is restarted. Closing the browser editor tab doesn't seem to stop it.

What version of nodejs are you running?
npm -v
to find out, or look in the node red startup log.

10.16 LTS on ARM/Debian

Do you have any other time related nodes in the flow ?

Can you start Node-RED in safe mode (add --safe to the command line) and see if it still happens? That will help identify if it's something in your flows or the core runtime.

Also did you just upgrade node red or did you upgrade nodejs too? The problem has been reported previously with node 10.x and apparently it went away with a reversion to node 8.x.

@Colin Thanks for your help so far. The only thing that upgraded recently is Node-RED, dashboard too recently.

@dceejay Sorry, I should've been clearer, I am not doing any timing from my own (function node) code; I am using 2 of the built-in delay nodes (these are currently set to delay 0.25 sec and the status shows this accordingly), and intervals on the inject nodes. Nothing faster than 0.25 sec.

@knolleary Started it up in safe:

Welcome to Node-RED
===================

6 Jul 10:30:08 - [info] Node-RED version: v0.20.7
6 Jul 10:30:08 - [info] Node.js  version: v10.16.0
6 Jul 10:30:08 - [info] Linux 3.14.1 arm LE
6 Jul 10:30:12 - [info] Loading palette nodes
6 Jul 10:30:22 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
6 Jul 10:30:22 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
6 Jul 10:30:25 - [info] Dashboard version 2.15.5 started at /ui
6 Jul 10:30:26 - [info] Settings file  : /home/devuser/.node-red/settings.js
6 Jul 10:30:26 - [info] Context store  : 'm' [module=memory]
6 Jul 10:30:26 - [info] Context store  : 'f' [module=localfilesystem]
6 Jul 10:30:27 - [info] User directory : /home/devuser/.node-red
6 Jul 10:30:27 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
6 Jul 10:30:27 - [info] Flows file     : /home/devuser/.node-red/flows_freewave-ib.json
6 Jul 10:30:27 - [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.
---------------------------------------------------------------------

6 Jul 10:30:27 - [info] *****************************************************************
6 Jul 10:30:27 - [info] Flows stopped in safe mode. Deploy to start.
6 Jul 10:30:27 - [info] *****************************************************************
6 Jul 10:30:27 - [info] Server now running at http://127.0.0.1:1880/

And when I open the editor UI:

Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605201 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605194 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605189 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605181 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605175 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605170 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605168 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605162 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605154 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605147 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605143 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(node:1201) TimeoutOverflowWarning: 3074605138 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.

BTW, the only things I have installed outside of the vanilla setup are: node-red-dashboard and node-red-contrib-modbus

@thatcadguy the fact it only happens when you open the editor, and that it happens when you are in safe mode, means this will not be related to any nodes you have installed or the flow.

Looking for where we setup timers when a new editor connects I can see a couple possible causes.

Have you got adminAuth enabled? And if you have, have you set sessionExpiryTime to anything?

@knolleary Here is my settings.js, password hashes redacted (yes, I have adminAuth):

devuser@freewave-ib:~$ cat .node-red/settings.js
var fs = require('fs');
module.exports = {
    adminAuth: { type: 'credentials', users: [{ username: 'afcadmin', password: '', permissions: '*' }] },
    //httpNodeAuth: { user: 'afcuser', pass: '' },
    //httpStaticAuth: { user: 'afcuser', pass: '' },
    //https: { key: fs.readFileSync('/home/devuser/freewave-ib-key.pem'), cert: fs.readFileSync('/home/devuser/freewave-ib.pem') },
    contextStorage: { default: 'm', m: { module: 'memory' }, f: { module: 'localfilesystem' } },
    functionGlobalContext: { afnr: require('/home/devuser/afnr') }
}

Can you stop node-red, delete ~/.node-red/.sessions.json and restart?

You will need to log back in afterwards.

That did it! No timeout errors after reloading the editor. Thanks!

Great - also points me in the right direction to stop it happening again.

3 Likes

I'm hitting an issue on Windows, after the latest windows 10 update I get Error: listen EACCES 127.0.0.1:1880 and node-red refuses to start. the command is run as unprivileged user and nothing is listening on port 1880. Trying to start with --safe has the same results.

here is the complete log:

Welcome to Node-RED
===================

15 Jul 13:35:30 - [info] Node-RED version: v0.20.7
15 Jul 13:35:30 - [info] Node.js  version: v8.9.3
15 Jul 13:35:30 - [info] Windows_NT 10.0.18362 x64 LE
15 Jul 13:35:31 - [info] Loading palette nodes
15 Jul 13:35:31 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
15 Jul 13:35:32 - [info] Dashboard version 2.8.2 started at /ui
15 Jul 13:35:32 - [info] Settings file  : \Users\g.angoli\.node-red\settings.js
15 Jul 13:35:32 - [info] Context store  : 'default' [module=memory]
15 Jul 13:35:32 - [info] User directory : \Users\g.angoli\.node-red
15 Jul 13:35:32 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
15 Jul 13:35:32 - [info] Flows file     : \Users\g.angoli\.node-red\flows.json
15 Jul 13:35:32 - [error] Uncaught Exception:
15 Jul 13:35:32 - [error] Error: listen EACCES 127.0.0.1:1880
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at Server.setupListenHandle [as _listen2] (net.js:1334:19)
    at listenInCluster (net.js:1392:12)
    at doListen (net.js:1501:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

I think that you have an instance running already. Check Task Manager to see if that is the case and kill it.

I thought that was the case as well at first, but I cheked and there was no other instance running. So that put me back at square one.
The thing is that this problem arose just after the latest Windows 10 update to version: Windows_NT 10.0.18362 x64 LE that was enforced yesterday.
So maybe something changed on the windows side? I can't figure out what tho.

No, I don't believe so, everything is working fine for me

How are you starting Node-RED? It is possible to get Node-RED running in a process that isn't visible. Typically, this happens if you run it from a VScode process for example where VScode fails for some reason. You can check by looking in Task Manager and searching for instances of node.js. Add the command line column to task manager in order to be able to see any Node-RED instance.

Prior to the windows update, I had node-red starting via a scheduled task that opened a command prompt and launched node-red.cmd after I log in. Since the update I've noticed that the task wasn't getting launched so I've manually disabled it, and did many clean reboots afterwards.
For debug purposes I now launch node-red.cmd via Command Prompt manually to see what's happening. There is no other node.exe process running (checked with task manager and sysinternals process explorer) and of course nothing is binding port 1880.

Unfortunately I'm out of ideas.. :frowning: Upgrading Node maybe? I've noticed that you're using Node 10.x and I'm currently at 8.x