Nodered 0.20.2 crashes - TypeError: Converting circular structure to JSON

Hi,

I upgraded my Node-Red install to version 0.20.2 and now it’s constantly restarting or crashing with the following error:

18 Mar 14:49:50 - TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at getStateOfItems (/usr/lib/node_modules/node-red-contrib-openhab2/77-openhab2.js:100:50)
    at EventSource.node.es.onopen (/usr/lib/node_modules/node-red-contrib-openhab2/77-openhab2.js:148:14)
    at EventSource.emit (events.js:189:13)
    at _emit (/usr/lib/node_modules/node-red-contrib-openhab2/node_modules/@joeybaker/eventsource/lib/eventsource.js:209:17)
    at ClientRequest.<anonymous> (/usr/lib/node_modules/node-red-contrib-openhab2/node_modules/@joeybaker/eventsource/lib/eventsource.js:136:7)
    at Object.onceWrapper (events.js:277:13)
    at ClientRequest.emit (events.js:189:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)

The specific case in which this error is reproducable:

  • Have Openhab nodes available (node-red-contrib-openhab2 - v1.1.4)

  • Have huemagic nodes available that contain a Hue bridge configuration (node-red-contrib-huemagic - v1.9.0)

Just having my openhab nodes in a flow does not cause any problems
Just having the HueMagic nodes in a flow does not cause any problems

A soon as you make the combination, only when the hue bridge is configured, the above error is triggered.

I’ve also tried changing to other HUE nodes and this triggers the exact same behaviour.

Downgrading to version 0.18.x seems to resolve the issue.

Anybody else facing this issue? (please note that openhabian will install this release as well!)

Thnx!

Node-red version: 0.20.2
node.js version: 10.15.3
OS: Ubuntu 18.04 LTS

Maybe this helps:

@slombard seems to at least have found a temporary fix
You can also look at the already opened issue on github

Best regards Johannes

Thanx… bug is confirmed as well the soon to be expected update!

Otherwise you could although use the MQTT v2 binding generic thing and a modified way similar to the connection of two openhab instances two use mqtt instead.

That could work as a last resort but changing over 400 nodes in Node-red for something else is a nightmare :slight_smile: Developer expect the bugfix to be available later this week.

1 Like