SurePet plugin crashes Homebridge when it loses network connectivity
Closed this issue · 6 comments
Greetings,
I’m having an issue when my router reboots automatically or when I do it manually Homebridge will crash. I suspect that when the SurePet plugin loses network connectivity it causes Homebridge to crash. Any chance a retry could be added to plugin to maybe retry to connect every x seconds rather than it crash Homebridge.?
Hi @LeviJSmith,
This is a key feature of SurePetcare - how else would you know your internet had a temporary hiccup since you last used your PetCare products?
...
Just kidding! It would be helpful for me if you have any logs from when homebridge crashed though. I can try to reproduce this on my end but I'm not sure if I'll get the same results. Also I want to see if for sure it's this particular plugin or some other plugin causing the issue.
Thanks!
I’ll grab the logs next time it crashes and post them.
Here is the error info.
[Homebridge] [4/16/2020, 8:18:29 AM] [Ring] Failed to reach Ring server at https://api.ring.com/clients_api/dings/active. Trying again in 5 seconds...
[Homebridge] [4/16/2020, 8:18:33 AM] [Ring] Failed to reach Ring server at https://api.ring.com/clients_api/ring_devices. Trying again in 5 seconds...
[Homebridge] [4/16/2020, 8:18:39 AM] TypeError: this._notifyError is not a function
at SurePetcareApi. (/home/hoobs/.hoobs/node_modules/sure_petcare/index.js:157:18)
at self.callback (/home/hoobs/.hoobs/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.onRequestError (/home/hoobs/.hoobs/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:198:13)
at ClientRequest.EventEmitter.emit (domain.js:448:20)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at TLSSocket.EventEmitter.emit (domain.js:448:20)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
[Homebridge] [4/16/2020, 8:18:39 am] [SmartThings-v2] ERROR: uncaughtException: this._notifyError is not a function
[Homebridge] TypeError: this._notifyError is not a function
[Homebridge] at SurePetcareApi. (/home/hoobs/.hoobs/node_modules/sure_petcare/index.js:157:18)
[Homebridge] at self.callback (/home/hoobs/.hoobs/node_modules/request/request.js:185:22)
[Homebridge] at Request.emit (events.js:198:13)
[Homebridge] at Request.EventEmitter.emit (domain.js:448:20)
[Homebridge] at Request.onRequestError (/home/hoobs/.hoobs/node_modules/request/request.js:877:8)
[Homebridge] at ClientRequest.emit (events.js:198:13)
[Homebridge] at ClientRequest.EventEmitter.emit (domain.js:448:20)
[Homebridge] at TLSSocket.socketErrorListener (_http_client.js:392:9)
[Homebridge] at TLSSocket.emit (events.js:198:13)
[Homebridge] at TLSSocket.EventEmitter.emit (domain.js:448:20)
[Homebridge] at emitErrorNT (internal/streams/destroy.js:91:8)
[Homebridge] at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
[Homebridge] at process._tickCallback (internal/process/next_tick.js:63:19)
[Homebridge] [4/16/2020, 8:18:39 AM] Got SIGTERM, shutting down service...
I have published an update for this to fix the issue.... silly mistake on my part thank you for publishing your logs!
Awesome. I’ll update ASAP. Thx for fixing that so quickly.
Great! Let me know if you have any issues after updating. You’re welcome!