ebaauw / homebridge-lib

Utility Library for Homebridge Plugins
Apache License 2.0
94 stars 12 forks source link

Possible conflict with http-proxy-agent #28

Closed Zer0x00 closed 4 years ago

Zer0x00 commented 4 years ago

I don't really know where this belongs to, hopefully this is the right place.

The homebridge-zp plugin throws the following warning:

[10/15/2020, 13:07:09] [Sonos] warning: npm registry: TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received an instance of Object
    at checkListener (events.js:110:11)
    at ClientRequest.once (events.js:434:3)
    at new ClientRequest (_http_client.js:194:10)
    at Object.request (https.js:316:10)
    at Object.request (/usr/lib/node_modules/homebridge-fritz-platform/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js:25:22)
    at HttpClient.request (/usr/lib/node_modules/homebridge-zp/node_modules/homebridge-lib/lib/HttpClient.js:226:32)
    at HttpClient.get (/usr/lib/node_modules/homebridge-zp/node_modules/homebridge-lib/lib/HttpClient.js:136:17)
    at ZpPlatform._checkLatest (/usr/lib/node_modules/homebridge-zp/node_modules/homebridge-lib/lib/Platform.js:383:42)
    at ZpPlatform._heartbeat (/usr/lib/node_modules/homebridge-zp/node_modules/homebridge-lib/lib/Platform.js:293:12)
    at ZpPlatform._beat (/usr/lib/node_modules/homebridge-zp/node_modules/homebridge-lib/lib/Platform.js:287:42)

It seems to me like a conflict between this library and the http-proxy-agent library which is used by the homebridge-fritz-platform library.

ebaauw commented 4 years ago

Yes. One of the libraries they use breaks https. I understand it's solved in a recent version, see https://github.com/TooTallNate/node-agent-base/issues/35. homebridge-fritz-platform might need to update their dependencies, for the recent version to be used.

seydx commented 4 years ago

Fixed in v5