🎉 Node-RED 4.0.2 released

Starting the week with a Node-RED 4.0.2 release to address some issues identified over the last few days.

  • Fixes a crash in the new multiplayer mode
  • Fixes a memory leak in the editor where the monaco editors were not being tidied up properly
  • Fixes caching of the mermaid library - which will save 3Mb of unnecessary loading each time you access the editor

A few other smaller items thrown in as well - details in the changelog:

8 Likes

I don't remember if in previous versions when making changes or deploying, the console showed "flows stopped" and "flows started" every time, is this new? It is normal?

1 Like

Yes, it has always been there :slight_smile:

No.

1 Like

I don't often look at the logs so I don't know how long this has been going on but I just noticed a handful of these errors:

Unhandled rejection RequestError: AggregateError
    at new RequestError (/data/node_modules/request-promise-core/lib/errors.js:14:15)
    at plumbing.callback (/data/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/data/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/data/node_modules/@cypress/request/request.js:183:22)
    at Request.emit (node:events:519:28)
    at Request.onRequestError (/data/node_modules/@cypress/request/request.js:869:8)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

It is not clear what precipitates them but the line:position numbers are always the same.

EDIT: This is with the 4.0.2 docker image

Are there any know issues using NR 4.0.2 with Opera?

I just got the following error when opening NR 4.0.2 (running on a Pi) with Opera:

red.min.js?v=90df56f4f37b:18 Problem initialising 'monaco' code editor ReferenceError: monaco is not defined
    at Object.init (red.min.js?v=90df56f4f37b:19)
    at Object.init (red.min.js?v=90df56f4f37b:18)

The editor freezes in the screen before loading the flows:

Using the same instance with Firefox works perfectly.

That is interesting. I've a distant memory of seeing something similar (somewhere? Home assistant in docker I think) but it didn't register as something to dig into at the time.

Can you tell us your OS and opera version info please? Also, are there any plugins enabled in opera? Does opera have a no-plugins mode you can try please?

There was another recent forum post Steve. Docker I seem to remember.

Can you look at the networks tab in dev tools and report any resources that fail to load? The console might also say what has failed.

Opera Version:74.0.3911.75
Mac OS X 11.7.10 64-bit
No plugins installed but didn't find the no plugins mode for Opera. I did try a private tab but that had the same results.

All good there too, no failures.

Edit: in the same browser I can successfully open NR 3.1.0 and use it just fine ...

Ah, have you done anything to force the browser to clear the cache? On Windows, that would be ctrl-f5, not sure about how to do that on a Mac. On the network tab, you should get just about everything with a 200 response code instead of a 304.

Hi @gregorius

I note you're using Opera v74 - that was released in January 2021.

I've just tested with the current version, Opera v111 and all is working.

As Nick, I have also tested in opera (latest) and it works on Windows too.

We suspect something in the latest monaco is just too new for a browser this old.

However, I have raised an issue here: Look at possibility of expanding support for older browsers · Issue #10 · node-red/nr-monaco-build · GitHub

Cheers! If it's not a general issue and I assume it isn't since updated versions of Opera work.

Btw wasn't there a proposal to throw one of the editors out? Ace or Monaco? Or do I recall that incorrectly?

Ok, I'll look into updating Opera with Firefox starts to fail! I actually don't like Opera because it seems to regularly "forget" my privacy settings ...

Did that too, made no difference.

It seems that the solution would be an update of Opera or use Firefox - I'm happy to go for the latter.

Thanks for all the help! :+1:

@LosinIt

As all of the modules are being loaded from /data/node_modules this strongly implies this is a problem with an async callback in a node you have installed.

The @cypress implies it's a node that is interacting with a webpage, but that's about all we can say at this point.

Looking at the console for Opera 74 on Windows, you see this:

Which shows you what is going wrong. Unfortunately, even formatting the editor.js doesn't give a meaningful view (all still on 1 line) so not possible to easily see exactly what is wrong. Possibly someone with the correct setup could get the map file which would help.

While this is true Nick, and I've confirmed by installing the old version, are we really wanting to exclude JavaScript versions from 2021? (not saying one way or the other, just looking to make sure that whatever is done is deliberate rather than accidental).

1 Like

Thanks for confirming my sanity! The error message you're getting is exactly what I got - first the warning then the error ...

I wasn't making any statement on this aspect - just that we believed we had identified the root cause here and the quick fix would be to update to a more recent browser version.

Steve has also raised an issue to see if we can build monaco to be a bit more backward compatible.

1 Like

Thanks, @hardillb, I'll see what I can figure out from this insight.

I have rebuilt the v4.0.2 Docker containers to add the ARMv7 32bit containers back.

They should be available going forward.

2 Likes

I would like to know if it is possible to solve a problem in the email nodes, which happens when I get an error when connecting using IMAP, this error apparently stays cached and only disappears when I restart completely nodered.

Is there a way to solve this or can it be considered an NR bug?

The email nodes are not part of the core Node-RED release, they are maintained separately in the GitHub - node-red/node-red-nodes: Extra nodes for Node-RED repo.

Please raise an issue there with as much detail as possible.

2 Likes