Import Flow / View Nodes - no indication of duplication for junction nodes

Hi There!

I sometimes get "Some of the nodes you are importing already exist in your workspace." and when I view nodes, I get something like:

Basically there is no duplication to see!

I sat down and decided to find out what is going on. Turns out I have a junction that is duplicated across two flows. I.e., one of the two junctions shown in the image is a duplicate.

Any idea why the junction that is the duplicate isn't highlighted (by being unchecked)?

At the moment, the dialog isn't really useful since it seems everything is always checked...

You may need to show the first screen you see when you import the nodes.

There are 3 options.

Which one do you select there?

It looks like there are more items (but no scroll bar). Can you inspect the html/CSS and see if your mysterious node is scrolled off screen.

Regarding duplicate junction nodes, I'm not certain they should be called out as duplicates regardless of having the same ID tbh

"View Nodes" --> import copy and cancel aren't really an option ....

Screen Shot 2024-01-29 at 10.12.11

you mean in the workspace or in the listing? Either way, I'd do it with JS (as I did) to find the node....

I don't care - IDC! :wink:

Ok, so you click View Nodes.

Then you see ANOTHER screen - which I am not seeing here - where you select that node and then you have an option to do three things.
Ok, you posted doing my writing this reply.
Sorry.

But after I click the MIDDLE button: view nodes (as shown in your picture)
I get this

See picture.

In this example I am importing a SUBFLOW.

I click the white button (top left) AND the replace button (top right)

Then import and all is good.

But that doesnt really help us understand if it is a browser thing or a Node-RED bug.

What i hope to see is a node in the list with the option to replace

1 Like

The import is not perfect, there are cases which are not handled. In addition certain properties (belonging to the editor) are not shown.

Ah ok :+1:

Yes, no scrollbar and yes it goes on and - having checked - I know it's one of the junctions that is a duplicate ... hence there should be an unchecked there.

Subflows work but this was a junction that was causing the same error message and yet I wasn't shown the junction that was the duplication.

I think that's the point I was trying to make or rather the feeling I have :wink:


Thanks for checking folks :+1:

As background, I do a lot of importing so this happens often and eventually it becomes annoying that I don't know what it is that is duplicated. But it made me - finally - build a workaround for my use cases ...

I understand your frustration, but it would be really nice if you could please document repeatable issues and raise issues with step-by-step instructions and flows that demonstrate it. Then we could get this resolved in core in a future maintenance release. (thats the utopia anyhow)

Can you provide some examples of cases that are not handled? What properties are not shown? It should only be considering the properties of the node as per the flow json.

I agree but this is the reason why a node is indicated as changed but the window does not show it.

I have not yet tested the import in depth, for the moment I only have this case #4548 related to a type changes.

I also notice that the "replace" button is not always displayed (and not correctly) probably because of the size (i18n)

So, as soon as I have time I will do more tests :slightly_smiling_face: (an raise issue)

No frustration, well frustration enough that I will create something more logical!

Example: go here and import this flow:

[{"id":"e9773b22a6816d87","type":"delay","z":"f93e13e54f881a08","name":"","pauseType":"random","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"300","randomLast":"1000","randomUnits":"milliseconds","drop":false,"allowrate":false,"outputs":1,"x":690.2349114928925,"y":2351.7857674189977,"wires":[["8a090a46c53f85aa"]]},{"id":"caff3be4bed43276","type":"delay","z":"f93e13e54f881a08","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":964.4185858113424,"y":2351.3144930188946,"wires":[["d38b1d46d403d2fd"]]},{"id":"c9f660ea8f42eaa7","type":"junction","z":"f93e13e54f881a08","x":550.8368966664584,"y":2351.7857674189977,"wires":[["e9773b22a6816d87"]]},{"id":"8a090a46c53f85aa","type":"junction","z":"f93e13e54f881a08","x":825.0205709849088,"y":2351.3144930188946,"wires":[["caff3be4bed43276","20f89280fae84c94"]]},{"id":"20f89280fae84c94","type":"junction","z":"f93e13e54f881a08","x":952.8573309183121,"y":2298.9131979772023,"wires":[["269a153277292cbe"]]},{"id":"36f70c8b1c87950f","type":"junction","z":"f93e13e54f881a08","x":620.7142553329468,"y":2276.4285752773285,"wires":[[]]}]

of the four junctions checked only three are included on the flow and one is new ... which is which?

that's the view nodes dialog with all four junctions being checked although I was told there are duplicates?

Please raise an issue with steps to recreate. I will look at this in my weekly live-stream later today (4pm GMT Twitch)

Done - Importing flow with duplicate junction nodes: unclear which are junction nodes are duplicates ¡ Issue #4549 ¡ node-red/node-red ¡ GitHub

I haven't checked if your PR fixes it
(the field with "replace" is truncated)

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