ToddGreenfield / homebridge-onkyo

Homebridge module for Onkyo Receivers
ISC License
39 stars 23 forks source link

TypeError: Cannot read properties of undefined (reading 'some') #181

Closed dsaniel closed 2 years ago

dsaniel commented 2 years ago

Confirm you have checked the WIKI for troubleshooting first _Fill out and check ([x]) the boxes which apply.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Information on your Onkyo receiver:

  1. Model information TX-NR646 (Ethernet)

Information on your configuration:

  1. Homebridge config { "receivers": [ { "name": "Receiver", "model": "TX-NR646", "ip_address": "192.168.1.44", "filter_inputs": true, "max_volume": 30, "volume_type": "none", "zone": "main" } ], "platform": "Onkyo" }

Information from the log: [7/3/2022, 6:55:45 PM] [Onkyo] Initializing Onkyo platform... [7/3/2022, 6:55:45 PM] [Onkyo] ** [7/3/2022, 6:55:45 PM] [Onkyo] homebridge-onkyo version 2022.18.1 [7/3/2022, 6:55:45 PM] [Onkyo] GitHub: https://github.com/ToddGreenfield/homebridge-onkyo [7/3/2022, 6:55:45 PM] [Onkyo] ** [7/3/2022, 6:55:45 PM] [Onkyo] start success... [7/3/2022, 6:55:45 PM] TypeError: Cannot read properties of undefined (reading 'some') at /var/lib/homebridge/node_modules/homebridge-onkyo/index.js:796:24 at Array.filter () at OnkyoAccessory.addSources (/var/lib/homebridge/node_modules/homebridge-onkyo/index.js:795:38) at OnkyoAccessory.setUp (/var/lib/homebridge/node_modules/homebridge-onkyo/index.js:158:8) at new OnkyoAccessory (/var/lib/homebridge/node_modules/homebridge-onkyo/index.js:145:8) at /var/lib/homebridge/node_modules/homebridge-onkyo/index.js:37:22 at Array.forEach () at OnkyoPlatform.createAccessories (/var/lib/homebridge/node_modules/homebridge-onkyo/index.js:30:13) at new OnkyoPlatform (/var/lib/homebridge/node_modules/homebridge-onkyo/index.js:23:8) at /var/lib/homebridge/node_modules/homebridge/src/server.ts:473:40

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Goobaroo commented 2 years ago

It's crashing because inputs is not defined. It's not listed as required but it is needed.

dsaniel commented 2 years ago

I see, thanks!