Uncaught Exception | When the global variables are not defined, but used in a node

There comes an exception if the global variables are not defined and we try to launch the Node red and in a node the global variables are being read.

28 Sep 12:53:23 - [error] TypeError: Cannot read properties of undefined (reading 'indexOf')
    at MQTTBrokerNode.node.setOptions (C:\Users\###\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\nodes\core\network\10-mqtt.js:590:33)
    at C:\Users\###\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\nodes\core\network\10-mqtt.js:423:37
    at _callback (C:\Users\###\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\nodes\core\network\10-mqtt.js:834:62)
    at C:\Users\###\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\nodes\core\network\10-mqtt.js:869:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)`

Please can you raise an issue on github for this: Issues · node-red/node-red · GitHub

Please include more details so we can quickly recreate.

@knolleary Sure will do that.

@knolleary , i assume that the bug is in MQTT Nodes, how can i report that ?

Hi @mayurkhadse

The MQTT nodes are maintained in the core repository I linked to previously. Please raise an issue there.

For anyone finding this thread, the OP has raised an issue here: Uncaught Exception | When the global variables are not defined, but used in a node · Issue #4380 · node-red/node-red · GitHub

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.