zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.27k stars 1.91k forks source link

(Bug report) Trilium (on Windows) crashes on startup when run from network share #3722

Open meichthys opened 1 year ago

meichthys commented 1 year ago

Trilium Version

0.59.2

What operating system are you using?

Windows

What is your setup?

Local (no sync)

Operating System Version

Windows 10

Description

When trying to launch Trilium on Windows 10 from a network share Trilium crashes without any indication what went wrong. The issue was introduced between v0.48.9 and v0.49.0 since Trilum launches fine from network share in v0.48.9 but fails in v0.49.0

I've tried looking in the windows event logs and using procmon to identify any permissions issues but wasn't able to track down anything suspicious.

The logs show the last two times i tried launching Trilum (once on the working v0.48.9 and once on the non-working version 0.49.0). All versions since 0.49.0 don't work.

Error logs

16:07:08.587 CPU model: 11th Gen Intel(R) Core(TM) i4-11450H @ 2.60GHz, logical cores: 16 freq: 2611 Mhz
16:07:08.597 Listening on port 37840
16:08:03.864 DB not initialized, please visit setup page
16:08:03.865 DB size: 4 KB
16:08:05.279 App HTTP server starting up at port 37840
16:08:05.279 {
  "appVersion": "0.48.9",
  "dbVersion": 185,
  "syncVersion": 22,
  "buildDate": "2021-12-22T22:39:24+01:00",
  "buildRevision": "10a5773c66e678c6d2bd3bd9dc9952d5cd76b795",
  "dataDirectory": "C:\\Users\\user\\AppData\\Roaming\\trilium-data",
  "clipperProtocolVersion": "1.0"
}
16:08:05.279 CPU model: 11th Gen Intel(R) Core(TM) i4-11450H @ 2.60GHz, logical cores: 16 freq: 2611 Mhz
16:08:05.289 Listening on port 37840
16:08:45.392 DB not initialized, please visit setup page
16:08:45.393 DB size: 4 KB
16:08:46.795 App HTTP server starting up at port 37840
16:08:46.795 {
  "appVersion": "0.49.0-beta",
  "dbVersion": 188,
  "syncVersion": 23,
  "buildDate": "2021-12-23T23:03:21+01:00",
  "buildRevision": "f0217cae5eb4bdac12efe1d15bf26dc128e7f854",
  "dataDirectory": "C:\\Users\\user\\AppData\\Roaming\\trilium-data",
  "clipperProtocolVersion": "1.0"
}
meichthys commented 1 year ago

I should also clarify that if I move v0.49.0 to a non-network location, it works fine.

meichthys commented 1 year ago

It seems like it could be related to this change: https://github.com/zadam/trilium/commit/cd8c24ceae75c7bf64e346c13e7a251746bc9f08

zadam commented 1 year ago

Is the application or data on the network share?

Network filesystems like NFS are known to corrupt databases.

meichthys commented 1 year ago

Just the application. The data still seems to be saved in AppData on Windows

zadam commented 1 year ago

I see. Electron has been upgraded in 0.49, I think that's a more likely culprit.

meichthys commented 1 year ago

It seems like this issue may be relevant: https://github.com/electron/electron/issues/36698 It sounds like building with the --no-sandbox flag works, but I'm not sure what security issues that may introduce?

meichthys commented 1 year ago

I can confirm that the --no-sandbox flag does work.