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

TypeError: Cannot read properties of undefined (reading 'color') crashes plugin #22

Open
gagegreg opened this issue Oct 17, 2022 · 1 comment

Comments

@gagegreg
Copy link

gagegreg commented Oct 17, 2022

I keep restarting the plugin. I have 36 Lifx bulbs. So i probably have some original clunkers from about 6 years ago in the mix. Not sure if this could be why. But it seems that the Manufacturer and Model are undefined. I tried to get more information in Debug mode, but this particular error remains the same.

[16/10/2022, 19:50:38] [homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Manufacturer': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[16/10/2022, 19:50:38] [homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Model': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
TypeError: Cannot read properties of undefined (reading 'color')
at Bulb.hasColors (/var/lib/homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:63:46)
at LifxPlatformAccessory.bindFunctions (/var/lib/homebridge/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:75:19)
at /var/lib/homebridge/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:30:12
at /var/lib/homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:34:9
at /var/lib/homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:83:7
at /var/lib/homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:116:7
at Client. (/var/lib/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/lib/lifx/light.js:236:5)
at Client. (/var/lib/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/lib/lifx/client.js:451:26)
at Array.forEach ()
at Client.processMessageHandlers (/var/lib/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/lib/lifx/client.js:438:24)
[16/10/2022, 19:50:38] [Lifx Plugin] Child bridge process ended
[16/10/2022, 19:50:38] [Lifx Plugin] Process Ended. Code: 1, Signal: null
[16/10/2022, 19:50:45] [Lifx Plugin] Restarting Process...
[16/10/2022, 19:50:46] [Lifx Plugin] Launched child bridge with PID 17033`

@gagegreg
Copy link
Author

I read the comments on Issue #19 (The same issue, but reading 'productName'). I will try to remove the devices to find the guilty party. I will leave this issue here in case there is a way to modify the code to gracefully fail some of these devices. Thanks for your work developing this plugin. It's really great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant