Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

TypeError: Cannot read property 'close' of null #4

Closed
rxin opened this issue Jan 15, 2019 · 4 comments
Closed

TypeError: Cannot read property 'close' of null #4

rxin opened this issue Jan 15, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@rxin
Copy link

rxin commented Jan 15, 2019

I ungrouped my Sonos (which I think generated different speaker configurations) and when I restarted homebridge, an exception was thrown:

/usr/local/lib/node_modules/homebridge-upnp/node_modules/@langovoi/upnp-device-client/index.js:420
    this.server.close();
                ^
TypeError: Cannot read property 'close' of null
    at DeviceClient.releaseEventingServer (/usr/local/lib/node_modules/homebridge-upnp/node_modules/@langovoi/upnp-device-client/index.js:420:17)
    at MediaRenderer1.onBye (/usr/local/lib/node_modules/homebridge-upnp/MediaRenderer1.js:100:26)
    at SsdpServer._server.on (/usr/local/lib/node_modules/homebridge-upnp/UPnPPlatform.js:92:24)
    at SsdpServer.emit (events.js:188:13)
    at SsdpServer.SSDP._notify (/usr/local/lib/node_modules/homebridge-upnp/node_modules/node-ssdp/lib/index.js:346:12)
    at SsdpServer.parseCommand [as _parseCommand] (/usr/local/lib/node_modules/homebridge-upnp/node_modules/node-ssdp/lib/index.js:311:12)
    at SsdpServer.SSDP._parseMessage (/usr/local/lib/node_modules/homebridge-upnp/node_modules/node-ssdp/lib/index.js:294:10)
    at Socket.onSocketMessage (/usr/local/lib/node_modules/homebridge-upnp/node_modules/node-ssdp/lib/index.js:244:12)
    at Socket.emit (events.js:188:13)
    at UDP.onMessage (dgram.js:685:8)

Didn't really impact my usage but you might want to add a check there to make sure "server" is not null. Thanks.

@langovoi langovoi added the bug Something isn't working label Jan 15, 2019
@langovoi
Copy link
Owner

Could you provide full logs (with -D argument for Homebridge and DEBUG=* env variable) to my email (for your privacy): marklangovoi@gmail.com

@rxin
Copy link
Author

rxin commented Jan 15, 2019

When I reproduce it I will.

@langovoi
Copy link
Owner

I released 0.1.9 version, which should resolve issue.

@langovoi
Copy link
Owner

langovoi commented Jan 16, 2019

I hope new release resolved your issue, if not - re-open.

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

No branches or pull requests

2 participants