Cannot click deploy button in node red

Tags: #<Tag:0x00007f7398e0d450> #<Tag:0x00007f7398e0d310>

I have experienced this problem a few times in the last month. Each time my solution has been to restore from snapshot. Yesterday, however, the problem came back just hours after a snapshot restore :cry:. So now I realize that this “solution” won’t be working, going forward. I spent many hours searching for someone with a similar problem, but without success.

Setup
Home Assistant (prev. Hassio) running on raspberryPi
None Red running as add-on.
Everything is updated to lastest available versions.
Multiple browsers and operating systems have been tested on client side.

Problem description
Suddenly, when developing in node red, the deploy button cannot be pressed. It is red, but nothing happens when I press it.

This error code appears in the browser console when I press deploy:
TypeError: undefined is not an object (evaluating 'e.id')

These error codes appear when the page is loaded, but I’m not sure they are connected to this:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (purify.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (gridstack.min.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (gridstack.min.map, line 0)

Some other problems that has occurred roughly at the same time, and may be connected

  • Keyboard shortcut stops working (cmd-z brings back the last closed browser window, instead of functioning within node red).
  • Some nodes are impossible to select. Nothing happens when I click on them.

Result of troubleshooting so far
When I delete the flows.json-file and start node red, everything works again (but of course without my nodes). My suspicion is therefore that the flow-file is corrupt. However, since the problem comes back time after time after reverting to functioning backup, something is probably causing the corruption.

Way forward
What are my options If I don’t find the root cause? I can see these possibilities, but I don’t know which is most likely to succeed:

  • Uninstall Node red, start a new instance and use the last functioning flow file.
  • Uninstall Node red, start a new instance and import the flows one by one so that the flow file is created from scratch.
  • Do not uninstall node red, but remove the flow-file and import the flows one by one so that the flow file is created from scratch.

Any help to find the root cause would be extremely appreciated! If I don’t find it I would be thankful for your recommendations of what path to take of the ones listed under “Way forward”, above.

[Solved!]

For future visitors with the same problem:

After further hours of troubleshooting I managed to fix the flow file so that the error does not occur. It appears to be connected to the use of groups. I fixed the problem by doing the following:

  1. Stop node red
  2. Open the flow.json-file with a program that can display json files in a good format (I use json query on Mac).
  3. Delete all groups. They are found in the beginning of the file, after tabs and sub-flows.
  4. Start node red.

I will never use groups again on node red. After testing, I feel confident that all errors I experienced was connected to the use of groups.

May I suggest that you open an issue in the Node-RED repository?

The groups feature is very new and may have some bugs. It is important to inform the developers about them.

Good thinking! I created a bug now: https://github.com/node-red/node-red/issues/2668

1 Like

Can i suggest that you move to a standalong instance of NR - if you want to use the latest features etc then it would make a lot more sense. HACS has to do some trickery to get NR working the way it does so it is easier to simplify and just us the webhooks or MQTT add ons to communicate backwards and forwards

Craig

Yeah. As a quite heavy user of node-RED (around 2000 nodes), I should probably look into that!