intel-iot-gateway
intel-iot-gateway copied to clipboard
[red] Uncaught Exception
Hello,
Recently I had added node-red-contrib-azure-iot-hub node for connect my system with azure platform and send it my devices messages to the hub.
I had done tests with the platform and I could connected successfully but I found a problem if I want to work with the platform when I don't have internet connection.
When I work without internet I got differents errors from the azure-iot-hub and node-red is restarted.
Then I would like to know if there is a way for catch those errors and avoid the node-red exit, because my platform must work with internet or without internet.
[info] [azureiothub:Azure IoT Hub] Disconnecting from Azure IoT Hub
Feb 7 14:58:33 beaglebone NodeRedService[826]: 7 Feb 14:58:33 - [red] Uncaught Exception:
Feb 7 14:58:33 beaglebone NodeRedService[826]: 7 Feb 14:58:33 - TypeError: Object close has no method 'log'
Feb 7 14:58:33 beaglebone NodeRedService[826]: at printResult (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/azureiothub.js:216:27)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at safeCallback (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device/lib/client.js:21:17)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at _fsm.machina.Fsm.states.disconnected.close (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device/lib/client.js:124:11)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at _.extend.handle (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/machina/lib/machina.js:613:25)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at Fsm.(anonymous function) [as handle] (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/machina/lib/machina.js:466:63)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at Client.close (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/azure-iot-device/lib/client.js:603:13)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at disconnectFromIoTHub (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/azureiothub.js:112:20)
Feb 7 14:58:34 beaglebone NodeRedService[826]: at null.
[red] Uncaught Exception: Feb 7 15:28:49 beaglebone NodeRedService[13466]: 7 Feb 15:28:49 - TypeError: Cannot call method 'destroy' of null Feb 7 15:28:49 beaglebone NodeRedService[13466]: at Connection._terminate (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:539:23) Feb 7 15:28:49 beaglebone NodeRedService[13466]: at Connection._processError (/usr/local/lib/node_modules/node-red-contrib-azure-iot-hub/node_modules/amqp10/lib/connection.js:351:8) . . .
Feb 7 15:28:49 beaglebone NodeRedService[13466]: at CleartextStream.
What hardware platform and OS version is being used?
I am using node-red on a beaglebone black with linux a Debian Wheezy distribution Node-RED version: v0.14.6 Node.js version: v0.10.42 Linux 3.8.13-bone80 arm LE