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) Notes do not load #2283

Closed meichthys closed 2 years ago

meichthys commented 2 years ago

Preflight Checklist

Trilium Version

0.48.3

What operating system are you using?

macOS

What is your setup?

Local + server sync

Operating System Version

macOS BigSur

Expected Behavior

When navigating to the trilium web interface, notes should load normally. NOTE: notes do load normally when using the mobile web interface, or when using the MacOS app (sync also completes normally so it seems to indicate that there is a good connection to the server)

Actual Behavior

Notes no not load via web interface and error is logged in console:

tab_manager.js:152 Uncaught (in promise) Error: Cannot find noteContext id='7hLk'
    at TabManager.getNoteContextById (tab_manager.js:152)
    at NoteContext.getMainContext (note_context.js:74)
    at SplitNoteContainer.handleEventInChildren (split_note_container.js:121)
    at SplitNoteContainer.handleEvent (component.js:47)
    at FlexContainer.handleEventInChildren (component.js:61)
    at FlexContainer.handleEvent (component.js:47)
    at FlexContainer.handleEventInChildren (component.js:61)
    at FlexContainer.handleEvent (component.js:47)
    at FlexContainer.handleEventInChildren (component.js:61)
    at FlexContainer.handleEvent (component.js:47)
getNoteContextById @ tab_manager.js:152
getMainContext @ note_context.js:74
handleEventInChildren @ split_note_container.js:121
handleEvent @ component.js:47
handleEventInChildren @ component.js:61
handleEvent @ component.js:47
handleEventInChildren @ component.js:61
handleEvent @ component.js:47
handleEventInChildren @ component.js:61
handleEvent @ component.js:47
handleEventInChildren @ component.js:61
handleEvent @ component.js:47
handleEventInChildren @ component.js:61
handleEvent @ component.js:47
triggerEvent @ app_context.js:84
triggerEvent @ component.js:53
triggerEvent @ component.js:53
setNote @ note_context.js:51
async function (async)
loadTabs @ tab_manager.js:83
start @ app_context.js:35
async function (async)
start @ app_context.js:31
(anonymous) @ desktop.js:28
Promise.then (async)
(anonymous) @ desktop.js:26
tab_manager.js:152 Uncaught (in promise) Error: Cannot find noteContext id='7hLk'
    at TabManager.getNoteContextById (tab_manager.js:152)
    at TabRowWidget.updateTabById (tab_row.js:616)
    at TabRowWidget.noteSwitchedEvent (tab_row.js:610)
    at TabRowWidget.callMethod (component.js:86)
    at component.js:46
    at async Promise.all (/index 0)
    at async Promise.all (/index 0)
    at async Promise.all (/index 1)

I've tried:

Additional Information

No problem in the mobile interface or on the local MacOS app.

Screenshot when navigating to web interface: image

meichthys commented 2 years ago

I also found out that if i click the "Global Notes Map" icon, everything seems to be back to normal until i refresh the page: image

zadam commented 2 years ago

Hi, thanks for reporting this problem. To fix this issue on your end try to open the SQL console and execute this:

UPDATE options SET value = '[]' where name = 'openTabs'

and reload.

Alternatively you can wait for the soon to be released patch version.

meichthys commented 2 years ago

I tried this but as soon as i open the SQL Console, the nodes appear in node tree. After executing the command and then reloading, the nodes are still missing until I either open the SQL Console again or toggle the Global Note Map.

meichthys commented 2 years ago

Since I have a workaround I'm ok with waiting for the patch, but if the patch is only running the SQL command for us, it might not solve the issue (?)

meichthys commented 2 years ago

After restarting my browser the node tree seems to show up consistently now.