NRCHKB / node-red-contrib-unifi-os

Nodes to access UniFi data using endpoints and websockets
Apache License 2.0
27 stars 1 forks source link

Events are throwing log errors #61

Closed doctorkb closed 1 year ago

doctorkb commented 1 year ago

With every event from my Protect cameras, these errors are being logged:

12 Sep 13:47:01 - [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.
12 Sep 13:47:01 - [warn] Error
    at Object.evaluateJSONataExpression (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:775:18)
    at init.<anonymous> (/home/nodered/.node-red/node_modules/node-red-contrib-unifi-os/build/nodes/Protect.js:291:53)
    at Generator.next (<anonymous>)
    at /home/nodered/.node-red/node_modules/node-red-contrib-unifi-os/build/nodes/Protect.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/home/nodered/.node-red/node_modules/node-red-contrib-unifi-os/build/nodes/Protect.js:27:12)
    at Object.handleUpdate [as dataCallback] (/home/nodered/.node-red/node_modules/node-red-contrib-unifi-os/build/nodes/Protect.js:173:40)
    at /home/nodered/.node-red/node_modules/node-red-contrib-unifi-os/build/SharedProtectWebSocket.js:156:38
    at Array.forEach (<anonymous>)
    at WebSocket.<anonymous> (/home/nodered/.node-red/node_modules/node-red-contrib-unifi-os/build/SharedProtectWebSocket.js:152:49)

Looks concerning...

crxporter commented 1 year ago

@marcus-j-davies - any comments here?

marcus-j-davies commented 1 year ago

Yes!

This was introduced in Node RED 3.1. I'll put up a PR soon in a few minutes

marcus-j-davies commented 1 year ago

PR is up -> https://github.com/NRCHKB/node-red-contrib-unifi-os/pull/62

marcus-j-davies commented 1 year ago

This should now be resolved.

@crxporter, @Shaquu - I needed to publish via my own command line, the workflow throws up all kinds of errors (its never run correctly) - the build phase is fine, its the publish that breaks down in great fashion

doctorkb commented 1 year ago

Awesome, thanks!

I'm a little new to node red -- I see your release is from last year... do I need to do anything to pull this in, or do you have a release planned that I should just wait for?

marcus-j-davies commented 1 year ago

This fix is already released (I just released it), soon - you will see an update in the pallet menu if not already (the same place you installed the node)