kopiro / homebridge-playstation

Playstation integration for Homebridge / HOOBS.
Apache License 2.0
96 stars 9 forks source link

TypeError: Cannot read properties of undefined (reading 'toUpperCase') #86

Closed Aransh closed 7 months ago

Aransh commented 7 months ago

Describe The Bug: Since version v1.5.2, the plugin crashes on startup with error "Cannot read properties of undefined (reading 'toUpperCase')"

To Reproduce: Update from v1.5.1 to v1.5.2

Worth mentioning - originally I updated, changed the console name, and then restarted homebridge. Once I saw it was crashing, I removed the name and restarted again, but I'm seeing it still crashes...

Expected behavior: Plugin connects to Playstation successfully

Logs:

[11/15/2023, 12:19:17 PM] TypeError: Cannot read properties of undefined (reading 'toUpperCase')
    at /var/lib/homebridge/node_modules/homebridge/src/server.ts:445:75
    at Array.forEach (<anonymous>)
    at Server.loadPlatforms (/var/lib/homebridge/node_modules/homebridge/src/server.ts:401:27)
    at Server.start (/var/lib/homebridge/node_modules/homebridge/src/server.ts:176:29)
[11/15/2023, 12:19:17 PM] Got SIGTERM, shutting down Homebridge...
[11/15/2023, 12:19:17 PM] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
    at Bridge.Accessory.setupURI (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
    at Server.setServerStatus (/var/lib/homebridge/node_modules/homebridge/src/server.ts:155:45)
    at Server.teardown (/var/lib/homebridge/node_modules/homebridge/src/server.ts:199:10)
    at signalHandler (/var/lib/homebridge/node_modules/homebridge/src/cli.ts:93:12)
    at process.emit (node:events:513:28)
    at process.emit (/var/lib/homebridge/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)

Plugin Config:

        {
            "apps": [],
            "_bridge": {},
            "pollInterval": 5000,
            "platform": "playstation"
        }

Environment:

Aransh commented 7 months ago

Update Tried to downgrade back to 1.5.1, but still crashed Fiddled with it for a bit, only way I got it to work: Completely uninstall plugin sudo rm -rf /home/homebridge/.config/playactor Reinstall plugin (version 1.5.1) reconfigure

updating to 1.5.2 again breaks

kopiro commented 7 months ago

Fixing it now, thanks!

kopiro commented 7 months ago

Hey @Aransh , do you think you can help me testing this PR? https://github.com/kopiro/homebridge-playstation/pull/88

Aransh commented 7 months ago

Sure, how would I go about installing this on my homebridge?

kopiro commented 7 months ago

Hello, this issue has been solved in https://github.com/kopiro/homebridge-playstation/releases/tag/v1.6.0