Replacing a config-node crashes NR

Hi All,

I have a bit of a strange bug and I don't know where it comes from.

If I start NR with a missing config-node type, the editor shows me the unknown type for this config-node. Normal so far.

If I import a config-node with the same id and the right type (which exists), and I replace it, the editor seems to have done its job but when I deploy with Modified Nodes I get the following error:

27 Jan 19:05:02 - [info] En attente d'enregistrement des types manquants :
27 Jan 19:05:02 - [info]  - database-config
27 Jan 19:05:02 - [info] Le serveur est disponible à l'adresse http://127.0.0.1:1880/
27 Jan 19:05:55 - [info] Arrêt des noeuds modifiés
27 Jan 19:05:55 - [info] Noeuds modifiés arrêtés
27 Jan 19:05:55 - [info] Flux mis à jour
27 Jan 19:06:08 - [info] Démarrage des noeuds modifiés
27 Jan 19:06:54 - [red] Uncaught Exception:
27 Jan 19:06:54 - [error] TypeError: Cannot read properties of undefined (reading 'update')
    at start (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:377:31)

If I look in the runtime, activeFlows is an empty object, so:

activeFlows['global'].update(activeFlowConfig,activeFlowConfig);

throw the error.

Note: A full deployment does not have this problem.

To reproduce this behavior:

  • Stop NR
  • Modify the flows.json file by changing the type of a config node
  • Start NR
  • Import this node with it's original type
  • Replace it
  • Deploy with Modified Nodes

Do you also have this behavior?

Thanks

If you can reliably recreate it, please raise an issue with these details.

I could well imagine that importing a replacement node whilst its type is unknown would be an untested scenario.

I think I put everything in.

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