naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
313 stars 63 forks source link

that.log.error is not a function, shuts down Homebridge #121

Closed salmundo11 closed 4 years ago

salmundo11 commented 4 years ago

this error sequence killed off Homebridge. I restarted HB and interrogated the plugin via Siri, no issues.

homebridge@1.0.4
homebridge-weather-plus@3.2.0
npm@6.14.5

[5/10/2020, 7:43:47 AM] TypeError: that.log.error is not a function
at WundergroundAPI.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/apis/weatherunderground.js:66:14)
at self.callback (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.onRequestError (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:210:5)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[5/10/2020, 7:43:47 AM] Got SIGTERM, shutting down Homebridge...
salmundo11 commented 4 years ago

another occurrence with SIGTERM:

[5/14/2020, 5:10:43 PM] TypeError: that.log.error is not a function
    at WundergroundAPI.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/apis/weatherunderground.js:58:15)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:185:22)
    at Request.emit (events.js:210:5)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:210:5)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:299:28)
    at IncomingMessage.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1183:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
[5/14/2020, 5:10:43 PM] Got SIGTERM, shutting down Homebridge...
salmundo11 commented 4 years ago

another occurrence at startup:

[5/14/2020, 7:52:05 PM] TypeError: that.log.error is not a function
    at WundergroundAPI.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/apis/weatherunderground.js:58:15)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:185:22)
    at Request.emit (events.js:210:5)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:210:5)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-weather-plus/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:299:28)
    at IncomingMessage.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1183:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
[5/14/2020, 7:52:05 PM] Got SIGTERM, shutting down Homebridge...
salmundo11 commented 4 years ago

At this point, I've removed weather-plus from my config.

naofireblade commented 4 years ago

Thanks for reporting. I cannot test weather underground and therefore rely on community feedback. Error handling for weather underground is better in v3.2.1