Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Error When Messenger Switch is Off #18

Closed
ablyler opened this issue Jan 5, 2021 · 3 comments
Closed

Unhandled Error When Messenger Switch is Off #18

ablyler opened this issue Jan 5, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@ablyler
Copy link

ablyler commented Jan 5, 2021

When the main "Messenger" switch is off, and one of the other service switches is turned on an unhandled error is thrown and causes homebridge to crash. The stack trace is below:

TypeError: Cannot read property '0' of undefined
    at HomebridgeMessenger.<anonymous> (/homebridge/node_modules/homebridge-messenger/index.js:121:36)
    at On.emit (events.js:315:20)
    at On.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22)
    at On.Characteristic._this.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:652:12)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1461:24
    at Array.forEach (<anonymous>)
    at Bridge.Accessory._this._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1303:10)
    at HAPServer.emit (events.js:315:20)
    at HAPServer.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22)
    at HAPServer._this._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:812:12)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:280:24)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
@kylemhall
Copy link

Seeing the same thing. Considering the default state of the Messenger switch is off, I didn't understand what I was doing wrong until I found this bug report!

@potrudeau
Copy link
Owner

@kylemhall and @ablyler : Obviously, this is a bug. I will investigate this over the week-end.

@potrudeau potrudeau added the bug Something isn't working label Jan 8, 2021
@potrudeau
Copy link
Owner

@kylemhall and @ablyler : Solved in new version 0.0.8. It's published and available now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants