Closed htmltiger closed 11 months ago
Log flooded with these... [warn] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author. 11 Jun 20:23:27 - [warn] Error
I also updated my docker images today, and im getting the same errors. running the version of homeassistant where its a stand-alone docker image without the supervisor.
ha version is homeassistant/home-assistant:stable... which isn't super useful, so heres some image labels:
"io.hass.base.image": "ghcr.io/home-assistant/amd64-base:3.18",
"io.hass.base.name": "python",
"io.hass.base.version": "2023.08.0",
"io.hass.type": "core",
"io.hass.version": "2023.9.0",
node-red is v3.1.0
plugin version is 0.56.1
+1
+1 please fix that problem
+1
3.1.0 stable is out and same problem!
Have dockerized version with nodejs v14.21.3
07. 09. 2023 13:21:52
7 Sep 13:21:52 - [warn] Error:
07. 09. 2023 13:21:52
at Object.evaluateJSONataExpression (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:775:18)
07. 09. 2023 13:21:52
at JSONataService.evaluate (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/JSONataService.js:58:39)
07. 09. 2023 13:21:52
at CallService.evaluateJSONata (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:131:36)
07. 09. 2023 13:21:52
at CallService.onInput (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/call-service/controller.js:63:50)
07. 09. 2023 13:21:52
at CallService.preOnInput (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:208:18)
07. 09. 2023 13:21:52
at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
07. 09. 2023 13:21:52
at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
07. 09. 2023 13:21:52
at callServiceNode.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11)
07. 09. 2023 13:21:52
at callServiceNode.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25)
07. 09. 2023 13:21:52
at callServiceNode.Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:494:10)
07. 09. 2023 13:21:52
at deliverMessageToDestination (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:799:40)
07. 09. 2023 13:21:52
at Immediate._onImmediate (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:815:21)
07. 09. 2023 13:21:52
at processImmediate (internal/timers.js:464:21)
07. 09. 2023 13:22:17
7 Sep 13:22:17 - [warn] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author.
07. 09. 2023 13:22:17
7 Sep 13:22:17 - [warn] Error:
07. 09. 2023 13:22:17
at Object.evaluateJSONataExpression (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:775:18)
07. 09. 2023 13:22:17
at JSONataService.evaluate (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/JSONataService.js:58:39)
07. 09. 2023 13:22:17
at CallService.evaluateJSONata (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:131:36)
07. 09. 2023 13:22:17
at CallService.onInput (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/call-service/controller.js:63:50)
07. 09. 2023 13:22:17
at CallService.preOnInput (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:208:18)
07. 09. 2023 13:22:17
at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
07. 09. 2023 13:22:17
at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
07. 09. 2023 13:22:17
at callServiceNode.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11)
07. 09. 2023 13:22:17
at callServiceNode.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25)
07. 09. 2023 13:22:17
at callServiceNode.Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:494:10)
07. 09. 2023 13:22:17
at deliverMessageToDestination (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:799:40)
07. 09. 2023 13:22:17
at Immediate._onImmediate (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:815:21)
07. 09. 2023 13:22:17
at processImmediate (internal/timers.js:464:21)
07. 09. 2023 13:22:42
7 Sep 13:22:42 - [warn] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author.
+1
I won't have time to implement and test this until about a week from now. This doesn't stop anything from working.
Unfortunately, it completely swallows the debug on right side.
+1 please fix it. Thanks
This doesn't stop anything from working.
Maybe not, but it does render the debug pane useless.
Please give your consent via emojis and not via a post.
Until the issue is resolved: Use version 3.0 and not latest with 3.1 of NodeRed
docker pull nodered/node-red:3.0
Thank you for @zachowj for your great work!
A temporary solution if you want to run version 3.1, without the log being spammed, is to comment out lines 772-775 @node-red/util/lib/util.js in the Node-RED source.
In the docker release, the path of the file is /usr/src/node-red/node_modules/@node-red/util/lib/util.js
A temporary solution if you want to run version 3.1, without the log being spammed, is to comment out lines 772-775 @node-red/util/lib/util.js in the Node-RED source.
In the docker release, the path of the file is
/usr/src/node-red/node_modules/@node-red/util/lib/util.js
That works. Thank you!
/usr/src/node-red/node_modules/@node-red/util/lib/util.js
thank you, work around works 👍
In the docker release, the path of the file is
/usr/src/node-red/node_modules/@node-red/util/lib/util.js
Yep this also worked for me Thanks!
A temporary solution if you want to run version 3.1, without the log being spammed, is to comment out lines 772-775 @node-red/util/lib/util.js in the Node-RED source.
In the docker release, the path of the file is
/usr/src/node-red/node_modules/@node-red/util/lib/util.js
Thanks for the quick fix. May I ask you to quickly drop the lines here that you have commented out? I have a docker installation and don't have the folder /usr/src/node-red/node_modules/@node-red/.
Thank you so much!
@meironke you have, inside of container!
docker exec -it nodered bash
Is there any temporary solution to avoid log being spammed if we are using the node-red addon from supervisor? I could downgrade to a previous addon version, 14.4.5 instead of using the new 14.5.0, using an old backup.
Log flooded with these... [warn] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author. 11 Jun 20:23:27 - [warn] Error
+1
Any idea when this can be looked at. New version of NR dropped in HA!
HA + HACS Node-Red Companion Add-on Raspberry PI4 what is the path?
@meironke you have, inside of container!
docker exec -it nodered bash
if using the addon, may need to replace "nodered" with the output of this command
docker ps --format '{{.Names}}' | grep nodered
After updating the file in the docker container & saving it does one need to also restart node red? I commented out the lines and restarted the addon, but the lines were back/no longer commented out.
So I assume that I need to restart the node red process in the docker instance so it picks up the change?
Edit:
Also, for me, the file was at /opt/node_modules/\@node-red/util/lib/util.js
... /usr/src
doesn't exist for me.
After updating the file in the docker container & saving it does one need to also restart node red? I commented out the lines and restarted the addon, but the lines were back/no longer commented out.
So I assume that I need to restart the node red process in the docker instance so it picks up the change?
Edit:
Also, for me, the file was at
/opt/node_modules/\@node-red/util/lib/util.js
.../usr/src
doesn't exist for me.
I also have the same issue. Is there no way to push an update to the node-red-contrib-home-assistant-websocket so this can be done cleanly. Until the real issue is resolved.
I can see there is a workaround for those running Node Red as a docker install, but for me who has it as an Addon in HA core install, is that an option?
I can see there is a workaround for those running Node Red as a docker install, but for me who has it as an Addon in HA core install, is that an option?
+1
I can see there is a workaround for those running Node Red as a docker install, but for me who has it as an Addon in HA core install, is that an option?
+1
I am also running Addon in HA on a Blue and I can't find that file at all.
dang I wish I knew how to get an editor to edit this file. apt-get doen't work, nano and vim isnt installed, and I tried to do a remote edit, but I dont know how.
So far I was able to navigate by the following: docker ps --format '{{.Names}}' | grep nodered docker exec -it addon_d0dbb904_nodered bash (hex changed)
root@d0dbb904_nodered:/opt$cd node_modules/@node-red/util/lib/ root@d0dbb904_nodered:/opt/node_modules/@node-red/util/lib/
ls and there is my file util.js lol
dang I wish I knew how to get an editor to edit this file.
try this: vi util.js
i to enter insert mode comment out the lines Esc key to exit insert mode
:w + enter to write the changes :x + enter to exit VI
And to go to proper line:
Its been a long time since I have used VI. and to insert a comment. I followed the example below the code for comment out using '*'
LOL so after verifying the change was made, I restart node-red and the lines 772-775 are uncommitted again or do I have to use the /* /
:)
I've found a fix for the supervisor setup:
/usr/share/hassio/addons.json
on the host machine with your editor of preference14.5.0
and replace it with 14.4.5
(it should appear two times in the file)I've found a fix for the supervisor setup:
- Open
/opt/hassio/addons.json
on the host machine with your editor of preference- Search for
14.5.0
and replace it with14.4.5
(it should appear two times in the file)- Save and exit the editor
- Reboot the whole host machine (restarting ha won't work)
- Now node-red should be in the old version
- Homeassistant will ask you to update the add-on - Don't 😄
I logged on my HA NUC with root but in /opt there is nothing, no /hassio folder and thus nothing under it. Do you do anything special to find it, I tried both su root and su - after logging in, but since I am in as root there should not be any need for it. Sorry if this is clear as day for everyone but me, but I am a bit lost :)
I logged on my HA NUC with root but in /opt there is nothing, no /hassio folder and thus nothing under it. Do you do anything special to find it, I tried both su root and su - after logging in, but since I am in as root there should not be any need for it. Sorry if this is clear as day for everyone but me, but I am a bit lost :)
Whops, right, I've symlinked something for convenience ;-) It should reside here /usr/share/hassio/addons.json
.
Otherwise you may also find it by using the following command:
find / -type f -name "addons.json"
yes - restore 14.4.5 from back up and you have to do a complete restart of system.
From: Mithrox @.> Sent: Thursday, September 14, 2023 2:09 PM To: zachowj/node-red-contrib-home-assistant-websocket @.> Cc: fixxser @.>; Comment @.> Subject: Re: [zachowj/node-red-contrib-home-assistant-websocket] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback (Issue #898)
I've found a fix for the supervisor setup:
I logged on my HA NUC with root but in /opt there is nothing, no /hassio folder and thus nothing under it. Do you do anything special to find it, I tried both su root and su - after logging in, but since I am in as root there should not be any need for it. Sorry if this is clear as day for everyone but me, but I am a bit lost :)
— Reply to this email directly, view it on GitHubhttps://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/898#issuecomment-1720155928, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJFW7V5DEH4PXVRNP4RIZILX2NXB7ANCNFSM6AAAAAAWEEODRY. You are receiving this because you commented.Message ID: @.***>
you know this makes total sense if we docker is reloading an image. I wish I would have thought of that.
From: Julian Zielke @.> Sent: Thursday, September 14, 2023 1:45 PM To: zachowj/node-red-contrib-home-assistant-websocket @.> Cc: fixxser @.>; Comment @.> Subject: Re: [zachowj/node-red-contrib-home-assistant-websocket] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback (Issue #898)
Guys what you are doing doesn't work. If the add-on is restarted, the change is reverted, since it's not on a mounted path outside of the docker image. So every time you restart node-red or ha, the change get's reverted.
— Reply to this email directly, view it on GitHubhttps://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/898#issuecomment-1720129387, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJFW7VYLCN3T33JPJ4PXH2TX2NUIHANCNFSM6AAAAAAWEEODRY. You are receiving this because you commented.Message ID: @.***>
yes - restore 14.4.5 from back up and you have to do a complete restart of system. …
Right, I haven’t thought about that. Much better than fiddling with files. 👍
Hi,
maybe i found a workaround for users of the NR-Addon. Put the following line in the config page of the Addon in the section init_commands
and restart the addon.
sed -i "772,775d" /opt/node_modules/@node-red/util/lib/util.js
( added missing /opt/
thx @kevinschmidt86 )
Hi, maybe i found a workaround for users of the NR-Addon. Put the following line in the config page of the Addon in the section
init_commands
and restart the addon.
sed -i "772,775d" node_modules/@node-red/util/lib/util.js
Worked for me, except I had to add "/opt/" the string, resulting in the following: "sed -i "772,775d" /opt/node_modules/@node-red/util/lib/util.js"
Thanks @kevinschmidt86 that was exactly what I needed. It fixed it for me too.
it works! :+1:
Try to see if you can find it using:
find / -name util.js -type f -exec grep -i "RED.util.evaluateJSONataExpression" '{}' \; -print
The offending lines should be in 772-775
I did not find it using the command above (also tried / instead of . to make sure (I think you have edited the post now after I copied it).
However, I did put in the text in the init_commands and it seems to have solved it, no more error messages coming at this time.
Just so I understand, this is a warning of usage that won't work in the next major version, correct? Is it the nodes that need to be recreated in another way, or is it something else manually we need to do to circumvent the problem before the big upgrade?
And thank you to all of you above for the help, I appreciate it.
You are right about the '.' -> '/' edit.
This is a warning of something not going to work in NodeRED v4. The offending piece of software is the HA websocket. That needs to be corrected in order for the warning to disappear. The deletion of the four lines is a workaround to remove the warning from sight. I'm definitely going to remove the init_command above before upgrading to the next version of NodeRED (who know what could mistakenly be deleted then), and also try to remove it when there is a new version of the websocket
sed -i "772,775d" /opt/node_modules/@node-red/util/lib/util.js
Great stuff! Works a treat.
I also have it:
Error: at Object.evaluateJSONataExpression (/opt/node_modules/@node-red/util/lib/util.js:775:18) at JSONataService.evaluate (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/JSONataService.js:58:39) at CallService.evaluateJSONata (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:131:36) at CallService.onInput (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/call-service/controller.js:63:50) at CallService.preOnInput (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:208:18) at /opt/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/opt/node_modules/@node-red/util/lib/hooks.js:166:13) at callServiceNode.Node._emitInput (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) at callServiceNode.Node.emit (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25) at callServiceNode.Node.receive...
I then added sed -i "772,775d" /opt/node_modules/@node-red/util/lib/util.js
to my init_commands and it now works.
This is really not the solution but it is at least a wrokaround until the node gets fixed.
Hi. Per posts by me and others on the NR discord channel, this issue results in the Events-All node that checks for event type=zwave_js_value_notification results in this error. Version: HAOS 2023.9.2 HA Addon: 14.5.0 Error resolves after restoring addon 14.4.5 (still under 2023.9.2)
Here's the errors appearing the the Debug node. I'm happy to do any testing if it would be helpful. Just tag me here or on discord as @ha_tinkerer.
"Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author."
Error:
at Object.evaluateJSONataExpression (/opt/node_modules/@node-red/util/lib/util.js:775:18)
at JSONataService.evaluate (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/JSONataService.js:58:39)
at TypedInputService.getValue (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/TypedInputService.js:58:85)
at EventsAll.getTypedInputValue (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:134:39)
at /config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:138:32
at Array.forEach (
Everything is fine at Zwave, which properly includes the following in the logs: 2023-09-16 10:52:14.052 INFO Z-WAVE: [Node 031] Value notification: 91-0-scene-002 0 2023-09-16T14:52:14.055Z CNTRLR « [Node 031] received CentralScene notification { "nodeId": 31, "ccId": "Central Scene", "ccCommand": "0x03", "payload": "0x438002" } 2023-09-16 10:52:14.098 INFO Z-WAVE: [Node 031] Value updated: 38-0-targetValue 99 => 0 2023-09-16 10:52:14.110 INFO Z-WAVE: [Node 031] Value updated: 38-0-duration 0s => 0s 2023-09-16 10:52:14.112 INFO Z-WAVE: [Node 031] Value updated: 38-0-currentValue 99 => 0
I have the same error
same issue - do we know when this will be fixed? I have this issue in home assistant so not able to use any of the 'work arounds' mentioned above
Describe the bug
Just upgraded to node red 3.1.0-beta.2 but greeted with the following
To Reproduce
upgraded node-red by
npm install node-red@next
Expected behavior
No response
Screenshots
No response
Example Flow
No response
This package's version (not the Home Assistant add-on version)
0.49
Is Node-RED running in Docker?
No
Node-RED version
3.1.0-beta.2
Node.js version
18.15.0
Additional context
No response