Zeronet: [Enhancement] Automatic Error Reporting, for ZeroNet, for Plugins and for Sites

Created on 30 Aug 2018  路  4Comments  路  Source: HelloZeroNet/ZeroNet

It would be great to add automatic error reporting for ZeroNet core, for Plugins and for Sites.

Basically there should be a site that clients automatically report errors to, when they occurr with a standard ZeroNet/Plugin/Site version (we could check in some way that the user did not customize it).

  • Each Plugin/Site specifies a site address to which errors are reported
  • In such site errors are aggregated according to stack trace and to ZN/Plugin/Site version and the information found in the debug page is written to it, encrypted to the site owner/moderators
  • Such sites could be hidden from the user view and be given an higher default space limit
  • On error one could possibly redirect the user to the page of its error report and ask him to add some comments
  • The user could be notified about possible comments or requests of site owner/moderators

TODOLIST

  • [ ] Create example site that can be cloned and to which reports can be submitted
  • Insert error handler and submitter in

    • [ ] ZeroNet core

    • [ ] Plugin

    • [ ] Sites content.json key error_report_address


Sidenote: obviously the site should be named "ZeroError"

Most helpful comment

instead of auto-reporting the error, the user should be asked if they want to report the error. i can see a malicious zite trying to induce a plugin error to reveal info (like OS, install location, etc) in the stacktrace, and this would provide them with a way to read it. the user should be able to review/manually sanitize the contents of the error before sending it off

All 4 comments

instead of auto-reporting the error, the user should be asked if they want to report the error. i can see a malicious zite trying to induce a plugin error to reveal info (like OS, install location, etc) in the stacktrace, and this would provide them with a way to read it. the user should be able to review/manually sanitize the contents of the error before sending it off

@skwerlman Good point, I agree.

A little thought about this:
Having separate error reporting for ZeroNet core and Plugins (or Sites) could be "difficult": consider a python error trace that has Plugin#main.py line 32 > ZeroNetCore#db.py line 101: the error could be either in the Plugin that calls a function of db.py in the wrong way, or of ZeroNet Core that does crash when given a valid request.

This could be done only after changing plugin architecture and writing "contracts" about what can be passed to a ZeroNet function. I can only think of doing it with Python3 type annotations.


So i will rephrase this issue, adding a possible way to add automatic error report to ZeroNet:

  • On every catched error, write the stack trace along with some other informations to a local file of the user.
  • Ask the user if he wants to report such an error to the ZeroError site.
  • Submit to the site only the stack trace, and if the programmer (HelloZeroNet at the moment) asks for more details the user could be prompted to send encrypted the other informations with the stack trace (that could be the whole execution log, and the values of the variables occurring in the functions along the stack trace)

The reporting zite should be a MergerZite.The reporting zite of Zeronet core(and plugin) is basic.
If it caught any error,it should dump the environment (variables/system&zeronet configuration).
Then ask user whether or not to report the bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HelloZeroNet picture HelloZeroNet  路  42Comments

HelloZeroNet picture HelloZeroNet  路  58Comments

n3r0-ch picture n3r0-ch  路  63Comments

ZeroNetTickBot picture ZeroNetTickBot  路  586Comments

BenMcLean picture BenMcLean  路  39Comments