Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback #537

Open
mbbert opened this issue Sep 24, 2023 · 0 comments

Comments

@mbbert
Copy link

mbbert commented Sep 24, 2023

Describe the bug
After the upgrade to Node-RED 3.1.0 the the debug window and log files are constantly flooded with this warning.

24 Sep 13:51:19 - [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.
24 Sep 13:51:19 - [warn] Error
    at Object.evaluateJSONataExpression (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:775:18)
    at positionConfigurationNode.getPropValue (/data/node_modules/node-red-contrib-sun-position/nodes/position-config.js:1228:39)
    at positionConfigurationNode.getOutDataProp (/data/node_modules/node-red-contrib-sun-position/nodes/position-config.js:762:25)
    at timeCompNode._inputCallback (/data/node_modules/node-red-contrib-sun-position/nodes/time-comp.js:158:57)
    at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
    at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
    at timeCompNode.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11)
    at timeCompNode.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25)
    at timeCompNode.Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:494:10)
    at deliverMessageToDestination (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:799:40)
    at Immediate._onImmediate (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:815:21)
    at processImmediate (node:internal/timers:466:21)

Expected behavior
The deprecated API call should be replaced so that these warnings are no longer logged.

System information (please complete the following information):

  • Node Version v16.20.2
  • Node-Red Version 3.1.0

Additional context
I'm using version 2.1.1 of this node, but I'm confident that this isn't solved yet with version 2.2.0-beta3.

I'd would be happy to patch version 2.1.1 myself locally if somebody would help me with code for a work-around.
Currently I removed the deprecation warning from util.js.
I wasn't able to wrap my head around the callback/Promise/async thing :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant