tinypilot icon indicating copy to clipboard operation
tinypilot copied to clipboard

Design: Include JS errors in TinyPilot debug logs

Open mtlynch opened this issue 2 years ago • 0 comments

The current TinyPilot debug logs are all from logs on the device itself, so we don't see errors that occurred in the client's browser.

In some cases, it would be helpful for diagnosing a customer's issue if we could see the contents of their JS console error log.

This is nontrivial, as there are a few issues to solve:

  • Where do we store JS logs to ensure they get properly logrotated?
  • What does the backend endpoint look like for receiving JS errors?
  • How do we trigger the web app to send JS errors to the backend?
    • I don't know how to do it, but there are a ton of JS error monitoring platforms (e.g., Sentry) that seem to hook into the browser's error handler, so I'm pretty sure there's some way of grabbing JS errors.

mtlynch avatar Oct 04 '23 20:10 mtlynch