zadam / trilium

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

(Bug report) You're passing an async function to api.runOnBackend() which will likely not work as you intended. Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling( #4659

Closed dcooper94 closed 8 months ago

dcooper94 commented 8 months ago

Trilium Version

0.62.6

What operating system are you using?

Other Linux

What is your setup?

Local (no sync)

Operating System Version

Windows

Description

i was trying to use the theme switch widget on my trilium instance running in proxmox and when i ran the script i am no longer able to access the webUI.

I get this error You're passing an async function to api.runOnBackend() which will likely not work as you intended. Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling( I cant seem to figure out how to run it in safe mode either.

Error logs

No response

zerebos commented 8 months ago

You should tell the author of that widget to update their code, this is Trilium warning them against doing something unexpected, and NOT a problem with Trilium itself.

dcooper94 commented 8 months ago

Ok, how do i recover my notes then? i cant access them as this error pops up then does not display my notes

dcooper94 commented 8 months ago

trilium notes error

zerebos commented 8 months ago

Close your current Trilium, locate your Trilium EXE and run the trilium-safe-mode.bat

dcooper94 commented 8 months ago

@rauenzi Yeaaa.. Im running it in proxmox as an lxc container

zerebos commented 8 months ago

I know nothing about that. If you can set an environment variable like TRILIUM_SAFE_MODE to 1 then relaunch, that should work as well

dcooper94 commented 8 months ago

Thanks for your help anyway! ill keep looking at what i can do.. is there any way of removing the note from the database?

zerebos commented 8 months ago

The ETAPI should still be running while the frontend is like that, you could use that to delete a note or remove the #widget tag. But I still think setting an environment variable and using safe mode is the best bet. There's likely a way to add one to your setup based on my quick reading on proxmox/lxc

dcooper94 commented 8 months ago

If you find anything please let me know, i have tried lxc.environment = from the shell and get nothing I really dont want to loose my notes

zerebos commented 8 months ago

The users here were using proxmox lxc containers with environment variables to set safe mode https://github.com/zadam/trilium/issues/3797

dcooper94 commented 8 months ago

2024-02-23 16_08_43-pve - Proxmox Virtual Environment — Mozilla Firefox So i can see this part in the file that article references, but i cant seem to make it work..

dcooper94 commented 8 months ago

Well now i cant even access them, just get a blank page :(

Nriver commented 8 months ago

You can run in safe mode with trilium-safe-mode.bat.

dcooper94 commented 8 months ago

@Nriver im running it in a Proxmox lxc container so that wont work. UPDATE!! i managed to deploy a docker instance and copy over my database file to the new docker container and we have my notes back! FEWWWWWW aha