NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
442 stars 77 forks source link

Cannot read properties of null (reading 'characteristics') #507

Closed alexwala closed 2 years ago

alexwala commented 2 years ago

Get this error often (randomly) - leads to restart of homebridge:

[3/21/2022, 8:30:30 AM] TypeError: Cannot read properties of null (reading 'characteristics')
    at _sendHapEvent (/usr/lib/node_modules/homebridge-alexa/node_modules/hap-node-client/lib/eventedHttpClient.js:103:17)
    at Socket.<anonymous> (/usr/lib/node_modules/homebridge-alexa/node_modules/hap-node-client/lib/eventedHttpClient.js:69:11)
    at Socket.emit (node:events:520:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
[3/21/2022, 8:30:30 AM] Got SIGTERM, shutting down Homebridge...

how to debug what is to blame ?

NorthernMan54 commented 2 years ago

I fixed the logic so it shouldn't crash anymore when this re-occurs, and if debug logging is enable it will log additional details in a line starting with

Incomplete EVENT

alexwala commented 2 years ago

:+1: thanks !