trilium
trilium copied to clipboard
(Bug report) JavaScript error when attempting to run when an instance is already running
Trilium Version
0.52.3
What operating system are you using?
Windows
What is your setup?
Local (no sync)
Operating System Version
Win10Pro 10.0.19044 Build 19044
Description
Running Trilium while an instance is already running throws the error shown above. The error occurred when I was on a different view whilst using Windows' Task View, and attempted to launch Trilium from the taskbar in a View that didn't have it running in.
This is intended behavior I believe. If you want to run multiple, separate instances with separate data, you can change the data directory. If you want to run multiple, identical instances with the same data, you must open the existing instance, click the logo in the top left, and click "Open New Window".
Edit: Maybe it would be possible to trigger a new window creation to the existing instance instead of loudly crashing with this error, though...
@sigaloid is correct, this is expected behavior, although it is not very user-friendly.
The error is about port (part of trilium is a webserver), but even changing that wouldn't help immediately, since multiple processes can't run on the same SQLite database.
The work around is to open a second trilium window if needed:
Edit: Maybe it would be possible to trigger a new window creation to the existing instance instead of loudly crashing with this error, though...
Possible, but not easy, new process would have to find the existing process and send a message to open a new window.