andreypopov / node-red-contrib-zigbee2mqtt

Zigbee2mqtt connectivity nodes for node-red
GNU General Public License v3.0
94 stars 24 forks source link

TypeError: Cannot read properties of null (reading 'config') after Upgrade to 2.4.0 #92

Closed C64Axel closed 2 years ago

C64Axel commented 2 years ago

Hi. NodeRed: Container Version 3.0.1 zigbee2mqtt: Container name zigbeegw1 Version latest-dev zigbee2mqtt: Container name zigbeegw2 Version latest

I have tried to update to version 2.4.0. After starting NodeRed i get the following Error:

25 Jul 11:36:17 - [info] Started flows 25 Jul 11:36:18 - [info] [zigbee2mqtt-server:zigbeegw1] MQTT Connected 25 Jul 11:36:18 - [info] [zigbee2mqtt-server:zigbeegw1] Refreshing devices 25 Jul 11:36:18 - [info] [zigbee2mqtt-server:zigbeegw2] MQTT Connected 25 Jul 11:36:18 - [info] [zigbee2mqtt-server:zigbeegw2] Refreshing devices 25 Jul 11:36:18 - [info] [mqtt-broker:Nodered] Connected to broker: mqtt://mosquitto:1883 25 Jul 11:36:18 - [red] Uncaught Exception: 25 Jul 11:36:18 - [error] TypeError: Cannot read properties of null (reading 'config') at MqttClient. (/data/node_modules/node-red-contrib-zigbee2mqtt/nodes/server.js:126:53) at MqttClient.emit (node:events:527:28) at MqttClient._handlePublish (/data/node_modules/mqtt/lib/client.js:1547:12) at MqttClient._handlePacket (/data/node_modules/mqtt/lib/client.js:535:12) at work (/data/node_modules/mqtt/lib/client.js:438:12) at processTicksAndRejections (node:internal/process/task_queues:78:11)

Reverted to 2.2.5 an anything works fine

andreypopov commented 2 years ago

hm, strange, but ok, today I will fix

Klapperman commented 2 years ago

Same problem here, reverting to version 2.3.2 fixes the issue. Nothing else fixed it, including redeploying the nodes.

csmende commented 2 years ago

+1

andreypopov commented 2 years ago

please, check

csmende commented 2 years ago

Same result, unfortunately: NR3.0.1, Node 16 Z2M latest

Jul 25 22:13:39 Node-RED[10857]: 25 Jul 22:13:39 - [red] Uncaught Exception: Jul 25 22:13:39 Node-RED[10857]: 25 Jul 22:13:39 - [error] TypeError: Cannot read properties of null (reading 'config') Jul 25 22:13:39 Node-RED[10857]: at MqttClient. (/home/pi/.node-red/node_modules/node-red-contrib-zigbee2mqtt/nodes/server.js:126:53) Jul 25 22:13:39 Node-RED[10857]: at MqttClient.emit (node:events:527:28) Jul 25 22:13:39 Node-RED[10857]: at MqttClient._handlePublish (/home/pi/.node-red/node_modules/mqtt/lib/client.js:1547:12) Jul 25 22:13:39 Node-RED[10857]: at MqttClient._handlePacket (/home/pi/.node-red/node_modules/mqtt/lib/client.js:535:12) Jul 25 22:13:39 Node-RED[10857]: at work (/home/pi/.node-red/node_modules/mqtt/lib/client.js:438:12) Jul 25 22:13:39 Node-RED[10857]: at processTicksAndRejections (node:internal/process/task_queues:78:11)

andreypopov commented 2 years ago

you didn't update...

2022-07-25_13-19-47

csmende commented 2 years ago

Apologies, updated from wrong dir, now seeing:

Node-RED version: v3.0.1 Node.js version: v16.16.0 Linux 5.10.103-v7l+ arm LE

node-red-project@0.0.1 /home/pi/.node-red └── node-red-contrib-zigbee2mqtt@2.4.1

Jul 25 22:25:43 Node-RED[11852]: 25 Jul 22:25:43 - [red] Uncaught Exception: Jul 25 22:25:43 Node-RED[11852]: 25 Jul 22:25:43 - [error] ReferenceError: message is not defined Jul 25 22:25:43 Node-RED[11852]: at Zigbee2mqttNodeBridge.onMQTTMessageBridge (/home/pi/.node-red/node_modules/node-red-contrib-zigbee2mqtt/nodes/bridge.js:100:48) Jul 25 22:25:43 Node-RED[11852]: at ServerNode.Zigbee2mqttNodeBridge.node.listener_onMQTTMessageBridge (/home/pi/.node-red/node_modules/node-red-contrib-zigbee2mqtt/nodes/bridge.js:20:75) Jul 25 22:25:43 Node-RED[11852]: at ServerNode.emit (node:events:527:28) Jul 25 22:25:43 Node-RED[11852]: at ServerNode.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:188:20) Jul 25 22:25:43 Node-RED[11852]: at ServerNode.onMQTTMessage (/home/pi/.node-red/node_modules/node-red-contrib-zigbee2mqtt/nodes/server.js:809:22) Jul 25 22:25:43 Node-RED[11852]: at MqttClient. (/home/pi/.node-red/node_modules/node-red-contrib-zigbee2mqtt/nodes/server.js:27:62) Jul 25 22:25:43 Node-RED[11852]: at MqttClient.emit (node:events:527:28) Jul 25 22:25:43 Node-RED[11852]: at MqttClient._handlePublish (/home/pi/.node-red/node_modules/mqtt/lib/client.js:1547:12) Jul 25 22:25:43 Node-RED[11852]: at MqttClient._handlePacket (/home/pi/.node-red/node_modules/mqtt/lib/client.js:535:12) Jul 25 22:25:43 Node-RED[11852]: at work (/home/pi/.node-red/node_modules/mqtt/lib/client.js:438:12)

csmende commented 2 years ago

Can confirm 2.3.2 has no issues. 👍

C64Axel commented 2 years ago

Same here. I also remove the directory and install fresh

andreypopov commented 2 years ago
andreypopov commented 2 years ago

2022-07-25_13-56-55

also you can uncheck "Legacy availability payload" to use new payloads. But both new/old payloads should work now

C64Axel commented 2 years ago

Seems to work now. Thank you for fixing