diff --git a/Anonymized database.md b/Anonymized database.md new file mode 100644 index 0000000..5db531f --- /dev/null +++ b/Anonymized database.md @@ -0,0 +1,19 @@ +### Anonymized database + +In some cases, it's necessary to see the database structure to be able to debug the problem. Of course, we can't ask you to send us your [[document|Document]] file with your notes. + +For this, Trilium supports anonymization of the database - you can trigger this in Options -> Advanced tab. + +[[images/anonymization.png]] + +This will create a copy of your document and remove all sensitive data (currently note titles, contents, revisions, history and some of the options, and non-system attributes) while leaving all structure and metadata (e.g. date of last change). After this is done, the database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. The resulting file is stored in `anonymized` directory (placed in the [[data directory]]). You can safely attach it with your bug report or send it to zadam.apps@gmail.com + +#### Command line anonymization + +If the database is corrupted in a way which prevents Trilium to start up, you won't be able to trigger the anonymization from the UI. For such a case, anonymization is also available from command line: + +``` +node src/anonymize.js +``` + +This needs to be executed in the directory with Trilium source files, for desktop builds this in `resources/app` directory. diff --git a/Error logs.md b/Error logs.md new file mode 100644 index 0000000..996a3e4 --- /dev/null +++ b/Error logs.md @@ -0,0 +1,38 @@ +It's important to provide all available error logs together with bug reports. This page will show you how to do it. + +## Backend logs + +Open [[data directory]], go to `log` subdirectory and find the latest log file, e.g. `trilium-2022-12-14.log`. You can attach the whole file to the bug report (preferable) or open it and copy-paste only the last lines / lines you believe are relevant. + +If you have trouble finding it the log files, there's also an in-app option in top-left menu button -> Advanced -> Show backend log. + +## Frontend logs + +To provide frontend logs, we need to open the Developer Console. Often the easiest way is to press `CTRL-SHIFT-I` which should work in most browsers (and desktop app). + +If that doesn't work, then: + +* in Trilium desktop app, go to top-left menu button -> Advanced -> Open Dev Tools +* In Firefox/Chrome right-click anywhere in the page and click Inspect: + +[[images/error-logs-firefox-context-menu.png]] + +Once you have Dev Tools open, click on "Console" tab: + +[[images/error-logs-dev-tools.png]] + +Copy-paste (or screenshot) the logs. It's better to provide not just errors, but the whole log, which might provide context while analyzing the bug. + +## Providing sensitive data + +If you don't feel comfortable attaching the logs or anything sensitive to the public GitHub issues, feel free to mail them to zadam.apps@gmail.com + +Use this email to also provide anything which could assist in analysing the bug - e.g. files/images/ZIPs being imported or [[anonymized database]]. + +### Exporting note subtree for reproduction + +Often times, bugs manifest themselves in specific notes and having them would greatly ease reproduction and fixing. + +In such case, please export the relevant note subtree by right-clicking it on the left tree, choosing Export - HTML as ZIP: + +[[images/error-logs-export-subtree.png]] diff --git a/Troubleshooting.md b/Troubleshooting.md index b91670b..265fd6f 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -73,34 +73,4 @@ It's a great help to send bug reports. Here are some tips where to look at: Trilium uses GitHub issues - so please send your reports here: https://github.com/zadam/trilium/issues -**To be clear, the following are not required for each and every bug report, but may be asked for on per-issue basis.** - -### Browser console - -If Trilium UI is acting up, open developer console by pressing `CTRL-SHIFT-I`, there might be some relevant errors or warnings. - -All JavaScript errors should be also logged to backend logs, but it's possible something was missed. - -### Backend logs - -Trilium logs important events and errors into `logs` directory (inside [[data directory]]). These logs are very helpful in debugging problems, so please attach the latest ones with your bug report. You don't have to worry, they don't contain any sensitive information about your notes. - -### Anonymized database - -In some cases, it's necessary to see the database structure to be able to debug the problem. Of course, we can't ask you to send us your [[document|Document]] file with your notes. - -For this, Trilium supports anonymization of the database - you can trigger this in Options -> Advanced tab. - -![image](https://user-images.githubusercontent.com/617641/148821689-52a0aeb6-e61d-4f9b-880d-c1696e9d2429.png) - -This will create a copy of your document and remove all sensitive data (currently note titles, contents, revisions, history and some of the options, and non-system attributes) while leaving all structure and metadata (e.g. date of last change). After this is done, the database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. The resulting file is stored in `anonymized` directory (placed in the [[data directory]]). You can safely attach it with your bug report or send it to zadam.apps@gmail.com - -#### Command line anonymization - -If the database is corrupted in a way which prevents Trilium to start up, you won't be able to trigger the anonymization from the UI. For such a case, anonymization is also available from command line: - -``` -node src/anonymize.js -``` - -This needs to be executed in the directory with Trilium source files, for desktop builds this in `resources/app` directory. \ No newline at end of file +Check [[error logs]] page for info how to provide the necessary info. diff --git a/images/anonymization.png b/images/anonymization.png new file mode 100644 index 0000000..ec86f1a Binary files /dev/null and b/images/anonymization.png differ diff --git a/images/error-logs-dev-tools.png b/images/error-logs-dev-tools.png new file mode 100644 index 0000000..af1d9ae Binary files /dev/null and b/images/error-logs-dev-tools.png differ diff --git a/images/error-logs-export-subtree.png b/images/error-logs-export-subtree.png new file mode 100644 index 0000000..3b9e7bf Binary files /dev/null and b/images/error-logs-export-subtree.png differ diff --git a/images/error-logs-firefox-context-menu.png b/images/error-logs-firefox-context-menu.png new file mode 100644 index 0000000..f1dc186 Binary files /dev/null and b/images/error-logs-firefox-context-menu.png differ