This has been happening to me since months. And sometimes it's very difficult to find if something is missing.
In this case, I got tired from Victron deleting the settings.js file (and making fs readonly, and...) in the node-red they include in their PV equipment, and started a migration from a backup. I restored around 7 flows and as it wasn't correctly working I checked and already found 2 flows that have missing nodes. I recovered the same flows file in my computer to compare. So that's where the first screenshot comes.
Both NR are v2.2.2 and so was the original.
That's very odd... and ugly.
PS: And I forgot to say that sometimes nodes appear on a different flow than it's own.
No. This is happening in my computer and a VM installed on proxmox. This issue has nothing to do with Victron.
In my computer it runs in the official docker container and in the VM runs barebones.
Could you upgrade to 2.2.3 or 3.0.2 and try again?
Also, can you confirm ...
all items were selected before copying?
are there any errors in the browser console when copying?
are there any errors in the browser console when pasting?
Lastly, keep a copy of the JSON in an editor (like VSCode or notepad) & if, when you paste, something is missing - check the JSON has the item.
e.g. Is the COPY failing or the PASTE?
@Colin@Steve-Mcl
This is the flows.json file from the source node-red, but it is also happening while importing from any file. I can't see any pattern in the issue. Well, perhaps that the file must include more than one flow (tab).
In all the above images, it was the same file imported in two different machines, but if I undo the changes and try to re-import again, it will probably fail at other flows/nodes. It's random. And you can see that also fails on core nodes.
I can tell that those nodes/links will be present on the file because they are present in the other machine I imported.
I noticed before that if I tried to import a flow for doesn't had installed a node, it would mark those nodes as unavailable, but appearing in a random other flow, unlinked. So I made the habit to get the list of missing nodes and directly Ctrl-Z, install nodes, and try to re-import.
This one seems the above evolved.
I'll try to upgrade to 2.2.3. I think I'll still not ready for v3. (tried and miserably failed)
The missing elements are before deploying. Just after Import->File.
all items were selected before copying?
are there any errors in the browser console when copying?
are there any errors in the browser console when pasting?
Those are complete flows export. I mean: Export current flow / or directly picking the flows.json file from fs.
(&3) I'll look for that. But as I commented is always when selecting a file for import.
And it seems complete.
A fresh new 2.2.2 container also does the import correctly.
I've also tried to do a re-import on the first v2.2.2 (post #1) that missed a good amount of nodes, and this time it made it well.
I'm now thinking this could be more related to the browser. I often keep several browser instances open with so many tabs in them. In fact, I almost never close them.
Plenty amount of links missing.
And the console shows errors. The only problem is that I didn't have the console open and don't know the exact moment during the import they appeared.
JQMIGRATE: Migrate is installed, version 3.3.0 vendor.js:4:711
Node-RED: 2.2.2 red.min.js:16:23891
Versions red.min.js:16:23927
Projects disabled red.min.js:16:19693
Campos de contraseña presentes en una página insegura (http://). Esto es un riesgo de seguridad que permite que se roben las credenciales de inicio de sesión de los usuarios. 2 10.1.5.42:1880
Campos de contraseña presentes en una página insegura (http://). Esto es un riesgo de seguridad que permite que se roben las credenciales de inicio de sesión de los usuarios. 7 10.1.5.42:1880
Firefox no puede establecer una conexión con el servidor en ws://10.1.5.42:1880/comms. 3 red.min.js:16:33512
Campos de contraseña presentes en una página insegura (http://). Esto es un riesgo de seguridad que permite que se roben las credenciales de inicio de sesión de los usuarios. 9 10.1.5.42:1880
La conexión a ws://10.1.5.42:1880/comms fue interrumpida mientras la página se cargaba. red.min.js:16:33512
Campos de contraseña presentes en una página insegura (http://). Esto es un riesgo de seguridad que permite que se roben las credenciales de inicio de sesión de los usuarios. 7 10.1.5.42:1880
Error en el mapeo fuente: Error: request failed with status 404
URL del recurso: http://10.1.5.42:1880/vendor/vendor.js?v=2.2.2
URL del mapa fuente: purify.min.js.map 3
The fresh new v.2.2.2 imports it right, but I don't have the nodes installed. I'll try later having them installed, in case.
Mmm... No. My computer (docker) also loses links (mainly).
There is the Victron appliance that had NR and stopped working this morning. This is the donor of the flows from a backup.
IoT server that runs NR v2.2.2 barebones on debian. The receiver. This loses nodes and links.
My computers testing NR v2.2.2 docker. Loses mainly links.
Also in my computer I raised another NR v2.2.2 docker blank. Doesn't present the problem.
Again in my computer, raised NR v2.2.3 docker blank. Also doesn't present any problem.
But that last two ones, I think that could be not giving issues because they doesn't have any node installed. Of they don't have other flows, possibly duplicated.
Could be that NR does some checking with a node (that contains any credential), that makes the browser disconnect and lose part of the incoming flows?
Have you managed to capture the browser console output during a failed import yet? Also check one that succeeds in order that the differences can be seen.