errbufferoverfl / usb-canary

A Linux or OSX tool that uses psutil to monitor devices while your computer is locked. In the case it detects someone plugging in or unplugging devices it can be configured to send you an SMS or alert you via Slack or Pushover.
GNU General Public License v3.0
574 stars 66 forks source link

usb-canary will exit due to errors #17

Open jaseg opened 7 years ago

jaseg commented 7 years ago

In several places, usb-canary will quietly exit depending on external conditions. One such place is the twilio message handler. If a mere network error occurs, it will quietly exit.

Expected Behavior

When a messaging channel is configured and errors occur, usb-canary should asynchronously retry as many times as necessary to send the message. Under no conditions should failure of one messaging channel prevent other intact channels from working.

Current Behavior

If e.g. twilio and slack are enabled, and the twilio code raises an error, usb-canary will exit without even attempting to use slack.

Possible Solution

Handle all messaging asynchronously with appropriate back-off.

Steps to Reproduce (for bugs)

## Context usb-canary at least on first glance looks like a security tool. Thus it should be secure. ## Your Environment This is independent of operating system.
errbufferoverfl commented 7 years ago

Hi @jaseg,

Thanks for submitting an issue, this has been put into the roadmap. Again thanks for taking the time to contribute to USB Canary.

errbufferoverfl commented 6 years ago

Along with other improvements referenced in other issue comments, I am currently working on better error handling where possible, a number of improvements have been made, including using a different daemon which will allow - in case of failure of other logging mechanisms - logging to at least be done.