Possible bug in v1.1: cannot add nodes with different z properties

Hi,

Environment: Win 10. node-red v1.1. node.js 12.16.3. Chrome.

I've been using v1.1 extensively for the weekend - moving VERY large automation projects to it.

I really love the 'group' functionality - this is a game-changer as it encourages 'blocks' (groups) that document our code and make it much more comprehensible. Absolutely AWESOME!

There is something funny going on occasionally with create / copy / move / paste into 'groups'.

Several times it has given a 'slow page - do you want to wait' message. Reloading it (F5) fixed it.

Just now received error: "cannot add nodes with different z properties"

This was after I selected a lot of nodes and then did CTRL-SHIFT-g to group them.

Afterwards, to debug it, I then used CTRL-V into a blank area OUTSIDE where the Group would be created and sure enough - there were quite a few nodes pasted BUT several right on top of each other - in a jumbled-up pile.

I'll try to reproduce and capture the scenario & Chrome console when / if this occurs next.

Please don't take this as a negative: I like v1.1 enough to move 8 developers over to it over the next couple of weeks.


Update - went and looked in Chrome console.

Hmmm... Restarted node-red. clean copy of Chrome.
Opening a complex sub-flow (with multiple sub-flows in it) also with multiple Groups on it . Immediately generates 44 errors in Chrome console. I'm not sure it is significant but am willing to help reproduce / resolve in any way.

It is 'acting' like there is a group applied to some of the nodes - but no boundary / border visible.

Cheers,

Paul

That is indeed odd. If you had selected lots of nodes in the same tab, then they should all have had the same z property (because that identifies what tab they are on).

I think the rest of the issues you mention will stem back to this z property issue.

How easy is this for you to recreate? Does it happen every time for a particular selection of nodes? If so, can you export the nodes, rather than copy them, and share their JSON with me directly?

Could you also add:

process.env.NODE_ENV = "development";

to the top of your settings file? That will cause editor to load the non-minified version of the code which will make it a bit easier to track down the stack traces - although I think they are more symptom rather than cause here.

1 Like

Hi,

I agree the Chrome console errors are a symptom.

I've added your recommended debug statement.

So far unable to reproduce this issue (of course it has never reoccurred) but will copy nodes and email them should it do so.

Cheers,

Paul


Hi,

I was looking through a subflow (similar to last night in complexity / function) and noticed multiple (6) 'Groups' created that are only a 1 X 1 grid and contain absolutely nothing - no nodes, color attributes etc. They are positioned on the top-left (grid 1,1) of the sub-flow - all overlapping each other.

I did not create them.

I moved them apart to see / count them.

[{"id":"637fea65.68f114","type":"group","z":"4094e542.578f0c","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true},"nodes":[],"x":30,"y":90,"w":40,"h":40},{"id":"6c0fa4fa.624b8c","type":"group","z":"4094e542.578f0c","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true},"nodes":[],"x":30,"y":110,"w":40,"h":40},{"id":"80cc30e7.fd57a","type":"group","z":"4094e542.578f0c","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true},"nodes":[],"x":30,"y":70,"w":40,"h":40},{"id":"aaf4d3a4.6927c","type":"group","z":"4094e542.578f0c","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true},"nodes":[],"x":70,"y":50,"w":40,"h":40},{"id":"b1b56e6a.94797","type":"group","z":"4094e542.578f0c","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true},"nodes":[],"x":30,"y":50,"w":40,"h":40},{"id":"df09319c.ac837","type":"group","z":"4094e542.578f0c","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true},"nodes":[],"x":30,"y":110,"w":40,"h":40}]

Cheers,

Paul

Hi,

After using this Project a bit more I found that I can no longer click the red 'Deploy' button and believe something is corrupt in the file. The deploy button is red but does not return to gray as expected. The actions are not saved.

It is definitely the file contents because when I return to a previous version of the same projects it works properly.

In the Chrome console I see the following error displayed each time I click 'Deploy':

red.min.js:16 Uncaught TypeError: Cannot read property 'id' of undefined
at red.min.js:16
at Array.map ()
at s (red.min.js:16)
at Object.createCompleteNodeSet (red.min.js:16)
at R (red.min.js:16)
at HTMLAnchorElement. (red.min.js:16)
at HTMLAnchorElement.dispatch (vendor.js:2)
at HTMLAnchorElement.v.handle (vendor.js:2)

Cheers,

Paul

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.