hassio-addons / addon-node-red

Node-RED - Home Assistant Community Add-ons
https://addons.community
MIT License
541 stars 126 forks source link

Inject node and Debug Nodes unavailable #1921

Open SteveRMann opened 3 months ago

SteveRMann commented 3 months ago

It is really frustrating when I can’t use inject or debug nodes to test things.

When I open the add-on, the inject nodes don't inject and the debug nodes don't debug. When I first start Node Red (or redeploy all) the 'inject' buttons are greyed out and unusable. The debug warnings that are normal when I redeploy are also absent.

If other nodes are affected, it isn't apparent. Except that nodes with "Show debug information" selected are also silent.

Running Node-Red from the “Show in Sidebar” does not work. "Open WebUI" from the add-on configuration page does not work. Running Node-Red as a Web Page Dashboard does work.

I’ve tried everything except the nuclear option.

Steps to reproduce

(How can someone else make/see it happen)

I wish it were that easy. I've been chasing this for weeks and until opening the add-on in a web page dashboard I could never reproduce a repeatable works/doesn't work.

I have a sandbox installation of Home Assistant that I sometimes use for testing. The sandbox does not exhibit the same problem.

There is at least one other user with the same issue:

mshuflin commented 3 months ago

I have the same issue. A workaround is to access the node-red add on by using https://HAIP:1880 (or whatever is set in the network section of the configuration.

I have tried it:

ingo916 commented 3 months ago

I am having the same issue through the home assistant sidebar using my internal home assistant address - no ability to inject / debug directly accessing node-red using https://haip:1880/ - works as expected. image

taelinn commented 3 months ago

I am having the same issue, running the latest version of the addon

frostronic commented 3 months ago

I am also experiencing this issue. I get the crosshairs when I mouse over the radio button on the inject nodes and the debug nodes aren't showing data in the debug panel. I'm on the latest version on NR, and tried to fall back to the previous version from backup and the issue(s) persisted.

taelinn commented 3 months ago

This seems to have resolved itself on my install.

mshuflin commented 3 months ago

This is not resolved for me. previously it had temporarily resolved itself after a restart of the host system, but that has not worked recently

neilenns commented 2 months ago

I am also facing this issue. I just updated my node-red-contrib-home-assistant-websocket package to 0.66.8, and since the restart of node-red and updating my nodes I can't click on my inject nodes anymore to test my flows out.

smarthomeaf commented 2 months ago

same issue here and confirmed that directly accessing the UI is a valid workaround. It seems that when this happens, the issue here, also manifest itself.

https://github.com/hassio-addons/addon-node-red/issues/1922

I have permanently solved this in the past, by renaming my nodered config folder. This will create a fresh install of Nodered and then I just reimport my config. Not an ideal solution, but if you do not want to access the UI directly, this will be more of a permanent fix (until it happens again a few months later)

alexruffell commented 2 months ago

I am having the same issue. In the past it was always due to a Home Assistant server configuration node that got imported with flows I found online. Deleting that configuration node would fix the issue. This time around I don't have any but I found something I'd like others to test.

If I turn on safe_mode configuration option and restart NR, the inject nodes and debugs along with all the text under the nodes work again. Doing a full Deploy (as per instructions in pop up) gets you out of safe_mode and everything seems to be ok. Anyhow, if I reload the browser window, the issue returns. This doesn't fix the issue but may hopefully help someone who knows the innerworkings fix the issue.

Edit: It appears to fail in a weird way soon after (maybe a second or two). The buttons still work (meaning they are not greyed out) but no debug or states appear.

SteveRMann commented 2 months ago

Have you tried directly accessing node-red using https://your_home_assistant_ip:1880/

alexruffell commented 2 months ago

@SteveRMann Yes, and when I do everything works. I am trying to figure out how to fix the issue when used within HA. It would appear to be a websocket related issue (Chrome shows tons of websocket timeout messages) but all NR flows work fine which puzzles me as I would imagine that those timeouts would cause issues there too.

jeremeyi commented 2 months ago

Any updates on this? I am experiencing the same issue?

SteveRMann commented 2 months ago

It appears that the problem is in Home Assistant. Try accessing Node Red directly: ha_ip:1880

Tykwondo1 commented 1 month ago

Here's what I did to fix the problem:

1- I started by uninstalling the node-red add-on in HA.

2- I deleted the file: nodes-red-contrib-home-assistant-websocket. Which is located in addon_configs/12134_nodered/node_module/

3- restart HA

4- reinstall the node-red add-on

5- recreate the HA server in node-red and select it for each of the HA nodes

And there it is, for me it works without having lost any data.

### _UPDATE: after 10 minutes, the problem is back, so I continue searching_Everything works on port 1880

ikorpershoek commented 1 month ago

I'm not sure if this is a coincidence but I changed my theme to Aurora and everything is working. I could replicate it on my test server that had the same problem after NR 18.1.1 update.

BigThunderSR commented 1 month ago

I'm not sure if this is a coincidence but I changed my theme to Aurora and everything is working. I could replicate it on my test server that had the same problem after NR 18.1.1 update.

That didn't work for me.

Jurich2004 commented 1 month ago

I had the problem described here. I managed to fix it. I deleted the stream imported earlier from another source, then deleted the created entities from the node configuration. Rebooted Node Red and everything worked out. Maybe my case will be useful to someone.

sanderlv commented 1 month ago

https://github.com/hassio-addons/addon-node-red/issues/1938#issuecomment-2393313472

sanderlv commented 1 month ago

I had the problem described here. I managed to fix it. I deleted the stream imported earlier from another source, then deleted the created entities from the node configuration. Rebooted Node Red and everything worked out. Maybe my case will be useful to someone.

What stream where?

Jurich2004 commented 1 month ago

Earlier I downloaded a sample stream from the internet and deployed it. I deleted it and deleted the entities it created. After that everything was fine. I had to delete the calls to the HA and several sensors created by this flow.

sanderlv commented 1 month ago

Earlier I downloaded a sample stream from the internet and deployed it. I deleted it and deleted the entities it created. After that everything was fine. I had to delete the calls to the HA and several sensors created by this flow.

What samplestream and where? This appears to be a HA container ingress thing. I don't see how deploying a new flow could affect browser connections...

Jurich2004 commented 1 month ago
ex
eMeF1 commented 1 month ago

I'm having the same issue with the inject nodes not working and no labels available. I remember importing some flow around the time the issue first appeared, but I've already deleted it without any impact. Today, I removed the duplicated HA server configuration, and after deploying, it started to work again. However, it didn't survive a page reload. Interestingly, if I leave the page open, the issue disappears after around 10 minutes. I hope this information is helpful for anyone looking into the problem.

UPDATE: After restarting the RPi, it works again! I believe removing the redundant HA server in Configuration nodes did the trick. I also upgraded HA to 2024.10.1 today.

alexruffell commented 1 month ago

Good news! I just updated node-red-contrib-home-assistant-websocket to 0.74.2 from Manage Palette and everything works again!

Edit: This applies to those that were not having the stray home assistant server issue as that is likely still solved by just deleting the stray server.

alexio70 commented 3 weeks ago

@alexruffell you made my day; works perfectly !!