Just Upgraded to NodeRED Add-on v14.5.0, all sorts of errors I've never seen before in the add-on log and debug log

With that corrected command, NR starts and… yep, no errors on startup. Zero errors is uncommon for me, but I just disabled a whole error-prone seasonal flow this morning in preparation for winter. So, zero. :+1:t2:

Oh right! That was the problem (why didn’t I think of it myself?

And the error is Node-Red is now gone.

Well, yes. If you delete the Node Red entity, the error is gone.

I missed the word processor quotes that the forum editor changes double-quotes to. It should have been posted in code brackets.

At any rate, it works here and I am not seeing the errors any longer.

Does anyone know if tis mutes all errors or just this specific one?

1 Like

Oh, my mistake! Apologies and thanks walberjunior. I think I didn’t enter it as code in my reply so it changed the quotes around.

My addon updated and error is gone. Thanks!!!

That’s great news!
Should we revert the changes some of us made (the sed -i command)?
If so, how could we do that?

Hi,

All of a sudden, my automations stopped working in my house.
When I looked into HA, I could see that NodeRed was no longer running.

When I click on “Start App”, the following error appears:
Image ghcr.io/hassio-addons/node-red/amd64:14.6.1 does not exist for addon_a0d7b954_nodered"

I can’t update the app either.
When I click on the “Update” button, nothing happens.
Current version: 14.6.1

I have not changed anything on the HA. The error occurred from one moment to the next.
Does anyone here have the same problem or can tell me what the problem is?

The image does not exist error answer/information, can be found in this issue:

https://github.com/hassio-addons/addon-node-red/issues/1701#issuecomment-1751649557

1 Like

Please let us know the results… :laughing:

I have reverted the sed init command (and restarted NR, of course) and I do not see any errors.

Can you let us know how you did that?
I’m not familiar with the “sed” command.

So, maybe you mean it cannot be reverted?

Just remove the line in the add-on configuration and restart it.

I am confused… after hitting the API warnings when I upgraded to 14.5, I never tried the sed command, I just reverted to the previous level and was waiting for this to be fixed. I just upgraded to 14.6.1, and I am still getting the “Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback” errors, but only exactly every 4 minutes.

Is 14.6.1 supposed to fix this? Because it hasn’t completely, for me.

Right! I swear I looked before in the yaml config.
Now I see the init_command. I’ll remove it when I have some time to test/look at it.

Right… I think I have resolved this - I have updated to 14.6.1, I have also just updated node-red-contrib-home-assistant-websocket in the palette manager to 0.57.3 (just out) and was then prompted to upgrade nodes, I do NOT have the sed command in the addon init section, and the errors are now gone. Everything seems to be working, but I have noticed one big change as a result of this - I make a lot of use of the “expose to home assistant” setting on various nodes, so I can easily turn on/off node red flows using a switch in HA. This used to be simple, I just filled in a field with for example “automatic hall motion control” on the event state node that watches the hall motion sensor, and that created a switch called that in HA which allowed the node red flow to be easily controlled if needed. If I edited that node, that name still appeared in the field and I could easily see what was going on.

Now, these switches all appear with entity names like “exposed as for …” with the name I originally set showing as the friendly name. In my example, the “automatic hall motion” switch I previously defined now shows up as “exposed as for hall motion” with a friendly name of “automatic hall motion”. This is an extra set of definition to go through when creating or editing these, and it is not nearly so clear what is going on. Apart from anything else, these "exposed as for… " names are really clunky and don’t always match up with the friendly names well at all, they seem to be derived from the name of the node on which they were first defined. If that name field is blank, you end up with the node showing names like “exposed as for 02f6ba3d0a789629” which is utterly useless, you have to go in to edit on the entry to see what the friendly name (the original name I used) is.

EDIT - I also just found 4 of these "exposed as " settings which had just been lost altogether, the result being the node where they were defined had no setting in the exposed as field, the nodes were disabled as they would be if the switch in HA was off, and the switch in HA was actually “unavailable” and hence unusable because they were no longer being defined/set from node red. To fix this I had to restart HA to get these unavailable switches in to a state where I could delete them, then re-define them in the nodes in node red with the same original entity names.

1 Like

Its been a week or s since I added the
sed -i "772,775d" /opt/node_modules/@node-red/util/lib/util.js
to the start up.
Things are now getting weird - 502 bad gateway , unable to load credentials and flows just stopping. I think node-red is crashing and restarting.

If node-red restarts, won’t the sed command re-run and delete more lines!?

How can I reinstall node red without losing all the flows etc?

Steve

The sed d command deletes those 4 lines. When that sed command is invoked multiple times, you might be corrupting that file. Why not replace the lines with empty ones? This command shows 4 commented lines with // Deleted in it.

sed -i "772,775 c\// Deleted\n// Deleted\n// Deleted\n// Deleted" /opt/node_modules/@node-red/util/lib/util.js

Much better way to handle this.

I was thinking to make the command conditional - something like this pseudo code:

if file_called_temp_edit does not exist then
  execute the sed command and create file_called_temp_edit
endif

In the end I did the following:
node red, export all flows
in settings > add-ons > node red

  • save the credential secret
  • reset to defaults
  • stop and delete the add on
  • go back to HACS and redownload it
  • replace the credential secret and turn off ssl
  • start it up

This worked - restoring the current version.

I was surprised to see that all my flows and imported nodes were already installed.