grzegorz914 / homebridge-xbox-tv

Homebridge plugin for Microsoft Game Console, publish as independent external platform accessory.
MIT License
166 stars 15 forks source link

homebridge starts crashing when xboxtv is configured #156

Closed frossmant closed 1 year ago

frossmant commented 1 year ago

Hello !

I have gotten this plugin to work for good amount of months but since a couple of updates it has started to crash my homebridge completely at startup when configured.

It's crashing with the following errors logged

`

2023-02-13T23:56:03.809489+01:00 sth-ka-net001 homebridge[9729]: [2/13/2023, 11:56:03 PM] TypeError: Cannot read properties of undefined (reading 'on')
2023-02-13T23:56:03.809574+01:00 sth-ka-net001 homebridge[9729]:     at new XBOXDEVICE (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge-xbox-tv/index.js:320:19)
2023-02-13T23:56:03.809606+01:00 sth-ka-net001 homebridge[9729]:     at HomebridgeAPI.<anonymous> (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge-xbox-tv/index.js:43:5)
2023-02-13T23:56:03.809673+01:00 sth-ka-net001 homebridge[9729]:     at HomebridgeAPI.emit (node:events:402:35)
2023-02-13T23:56:03.809714+01:00 sth-ka-net001 homebridge[9729]:     at HomebridgeAPI.signalFinished (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/src/api.ts:275:10)
2023-02-13T23:56:03.809743+01:00 sth-ka-net001 homebridge[9729]:     at Server.start (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/src/server.ts:190:14)
2023-02-13T23:56:03.843990+01:00 sth-ka-net001 homebridge[9729]: [2/13/2023, 11:56:03 PM] Got SIGTERM, shutting down Homebridge...
2023-02-13T23:56:03.885340+01:00 sth-ka-net001 homebridge[9729]: [2/13/2023, 11:56:03 PM] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
2023-02-13T23:56:03.885428+01:00 sth-ka-net001 homebridge[9729]:     at Bridge.Accessory.setupURI (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
2023-02-13T23:56:03.885470+01:00 sth-ka-net001 homebridge[9729]:     at Server.setServerStatus (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/src/server.ts:155:45)
2023-02-13T23:56:03.885504+01:00 sth-ka-net001 homebridge[9729]:     at Server.teardown (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/src/server.ts:199:10)
2023-02-13T23:56:03.885533+01:00 sth-ka-net001 homebridge[9729]:     at signalHandler (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/src/cli.ts:93:12)
2023-02-13T23:56:03.885561+01:00 sth-ka-net001 homebridge[9729]:     at process.emit (node:events:390:28)
2023-02-13T23:56:03.885589+01:00 sth-ka-net001 homebridge[9729]:     at process.emit (/var/lib/homebridge/.nvm/versions/node/v16.19.0/lib/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)

`

I have tried to revert back to the standard template configuration file available here on the github page and also generated a new configuration from the configx gui.

tothemoonsands commented 1 year ago

Having trouble too. Tried a lot of different things including completely deleting/re-installing, and nothing worked. It does seem you can revert way back to 2.4 or so and it should be OK. But since I deleted everything in my troubleshooting attempts, not able to get the Xbox linked right with 2.4 for some other reason.

frossmant commented 1 year ago

Yeah i've also tried to remove it completely and also update my node version to v16.19.0 without any luck.

Btw. the xbox i am trying to configure it to is an XBOX Series X.

frossmant commented 1 year ago

Having trouble too. Tried a lot of different things including completely deleting/re-installing, and nothing worked. It does seem you can revert way back to 2.4 or so and it should be OK. But since I deleted everything in my troubleshooting attempts, not able to get the Xbox linked right with 2.4 for some other reason.

npm install -g --unsafe-perm homebridge-xbox-tv@2.4

Interesting just tried to revery back to V2.4 and it seems to work now, thanks for the tip but this sure looks like a bug.

grzegorz914 commented 1 year ago

Fixed

tothemoonsands commented 1 year ago

Confirmed working for me, thanks for the speedy update!

frossmant commented 1 year ago

Great now it's not crashing anymore. Still have issues turning the Xbox on though but that's a separate issue.

grzegorz914 commented 1 year ago

@frossmant if you have problem power on its only your local configuration issue, check firewall, console settings Instant Power On, connections to network in standby etc. The plugin send correct packet to power on.