Issues with Monaco editor? Node-red 5

After running the latest install script on a Pi I'm seeing a couple of issues editing function nodes.

  1. Error triangle after editing a function node.
  • Open a function node
  • Click the arrow to open Monaco
  • Make a trivial change such as inserting a space in a string
  • Click Done, and Done
  • The node shows an error triangle.
  • To clear it, open the node again, click Done.
  1. Just the first character typed is sometimes not inserted in the editor.
    I can't pin down exactly when this happens, but it's quite frequent. Not confined to a single key, so it's not grit in my keyboard.

Does anyone else see this behaviour?

Um....

I'm seeing this happen to me now and then even on version 4.0.9

I'm saying this because I have been playing with subflows (yeah.....) and they have function nodes in them now and then.

I do a SMALL tweak and when done, the DEPLOY isn't active.

:confused:

Maybe I didn't change anything, or accidentally pressed CANEL rather than OK.

:person_shrugging:

So I do it again. All good.

It only happens now and then and very (VERY) unpredictable, so I dismissed it as my mistake.
But reading what you say: I'm now not sure.

Maybe it is more fundamental and not for 5.x only.

Hope I'm not crying wolf.
But I have noticed it and so am mentioning t.

Thanks for the feedback.

It's not identical though; I do see the Deploy marker as well as Error.
image

Honestly I am not sure of the specifics.

As they happen so infrequently.
But best of my memory, it is like I never edited the node.

There is (and always has been) a small race condition if you close the edit dialog really quickly after making a change - monaco hasn't re-linted the code yet so may still claim there is (or isn't) an error present.

I wonder if that's related to what you're seeing.

  • Click the arrow to open Monaco

Do you mean you're opening the expanded editor?

If you slow down clicking done each time - give Monaco a chance to sort itself out - do you still see the error?

Me?

Sorry, as stated, it really happens very rarely.
And of late mostly when working on subflows.

I open the function node do a quick edit (maybe change a variable's name from Show to show)
and exit.
No DEPLOY.
I repeat it and it then is active.

(OOPS)
Sorry, I'm hijacking the thread.
@jbudd posted and your reply was to the thread not me.

Yes, it only arises when I make a change in the expanded editor.

Yes. Waited 5 seconds before clicking Done.

I just noticed this red serpentine in the unexpanded editor, ie after changing the string and clicking Done just once. But it's not confined to node.warn lines.

Yes sorry, my bad habit.

I can reproduce. Very strange; if I enter node.error("hi") in the expanded editor, it's fine. I then click done - and it shows as an error in the unexpanded editor.

But entering node.error... in the unexpanded editor manually is fine.

Definitely something fishy going on. FYI @Steve-Mcl

@jbudd could I trouble you to raise an issue?

Looks like this was already reported yesterday.
https://github.com/node-red/node-red/issues/5796

Strange, I can re-create it on my dev instance which has lots of tabs and nodes. Not (yet anyway) reproduced it on a clean instance.