hassio-addons / addon-node-red

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

node-red dashboard UI 404 error from node-red main UI embedded link #1837

Closed dweston closed 3 months ago

dweston commented 4 months ago

Problem/Motivation

I've used node red within my HA OS environment for many years, however following the upgrade of the node-red addon to v v16.0.0 (Nov 15, 2023) with its breaking change moving the node-red addon code, config and data files out of the /config folder, now renamed /homeassistant folder, the node-red dashboard UI link button embedded in the node-red main UI page appears to still be being directed to its original (i.e. prior to v16) location http://homeassistant.local:8123/endpoint/ui, resulting in a 404 error. When node-red itself is invoked via its LH menu item it starts up correctly referencing its new location at http://homeassistant.local:8123/a0d7b954_nodered/ingress. Which suggests the issue is the dashboard UI path miss-referencing within the node-red itself.

One possible indication of the source of the problem could be the following reference warning within the node-red addon log:

(node:368) [DEP0128] DeprecationWarning: Invalid 'main' field in '/config/node_modules/node-red-dashboard/package.json' of 'none'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

Expected behavior

Click the node-red dashboard UI button in node-red and the dashboard UI opens in a new adjacent tab.

Actual behavior

Clicking the node-red dashboard UI button in node-red results in a new adjacent browser tab being opened but with a '404 note found' error reported.

Steps to reproduce

Clicking the node-red dashboard button always produces the same 404 error.

Proposed changes

It is possible to access the node-red dashboard UI by inserting the node-red default port # 1880 into the URL the node-red addon invokes (e.g. http://homeassistant.local:1880/endpoint/ui), which correctly opens the dashboard UI via redirect to 'http://homeassistant.local:1880/endpoint/ui/#!/0?socketid=-jEm2bocxXsGoD4YAAAA'. However, this may not be a complete solution as re error pop-ups are showing the dashboard UI implying some other miscommunication, probably in the reverse direction from the UI page attempting to respond back to the node-red addon.

This not so much a suggested solution 'fix' as to shed some light on what might be the root cause.

github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!