https://www.dendron.so/ logo
x

xg

04/13/2022, 11:54 AM
I have a workspace that has stopped working.. I get the error message "Cannot read properties of undefined (reading 'fname')" and no tree is shown in the tree view It is a ordinary VSCode workspace that has three dendron vaults in it. I tried removing all the cache-files but still get the error. Dendron preview and backlinks seem to work though. How do I find out what is wrong and fix it?
j

Joshi

04/13/2022, 12:13 PM
Hello @xg can you run
Dendron Dev Diagonistic Report
and Dm me the output? Also does this still happen after Reloading workspace?
x

xg

04/13/2022, 12:16 PM
Hi, yes, tried reloading the window just now and I get the same error message. I'll run the diagnostic and send you the output.
j

Joshi

04/13/2022, 12:24 PM
Copy code
"level":50,"time":1649852072054,"pid":37931,"hostname":"mac00828","name":"logger","name":"DendronError","status":"invalid_config","payload":"{}","stack":"DendronError: Missing code-workspace file /Users/jodfo01/Dendron/jody/dendron.code-workspace\n
Looks like the
dendron.code-workspace
is not present. Can you confirm that this file is present in the root of your workspace(where dendron.yml is present)?
x

xg

04/13/2022, 12:29 PM
My workspace settings filename is
jody-dendron.code-workspace
I created an ordinary VSCode workspace and then added dendron to it since having multiple workspaces named "dendron" makes it impossible to differentiate between them
general, personal and work are three vaults
I usually have two other workspaces that also use dendron open at the same time usually, so I needed the workspace names to be different. At the time of the diagnostics report, only this dendron workspace was open.
The other workspaces using dendron also use workspace config files that are not
dendron.code-workspace
Just tried opening them, and they work fine
j

Joshi

04/13/2022, 12:40 PM
Hmm.. let me take a closer look into that.
x

xg

04/13/2022, 12:48 PM
my workspace config in dendron.yml is this (if it helps):
Copy code
workspace:
    vaults:
        -
            fsPath: general
        -
            fsPath: personal
        -
            fsPath: work
k

kevins8

04/13/2022, 2:27 PM
@User when you load using
dendron.code-workspace
, does the tree view show up?
x

xg

04/13/2022, 2:33 PM
I'm not sure if I understood correctly, but I renamed
jody-dendron.code-workspace
to
dendron.code-workspace
and got the same error. I also have a 100% working workspace with multiple vaults with a config named
dendron.code-workspace
which I renamed
blabla.code-workspace
, opened it and it continued to work.
I opened the keyboard troubleshooting log and reloaded my vscode window with the issue and saw this error, don't know if it is significant:
[2022-04-13 16:34:54.521] [renderer10] [error] ENOENT: no such file or directory, open '/Users/jodfo01/Library/Application Support/Code/User/globalStorage/dendron.dendron/segmentresidualcache.log': Error: ENOENT: no such file or directory, open '/Users/jodfo01/Library/Application Support/Code/User/globalStorage/dendron.dendron/segmentresidualcache.log'
k

kevins8

04/13/2022, 2:51 PM
no that error is not significant
x

xg

04/13/2022, 2:54 PM
By removing vaults from
dendron.yml
I have concluded that the error only occurs when my
work
vault is used. Is there a way for me to investigate what is causing the error?
k

kevins8

04/13/2022, 2:57 PM
can you try restarting with just the work vault in debug mode? see [Set Dendron to debug mode](https://wiki.dendron.so/notes/a6c03f9b-8959-4d67-8394-4d204ab69bfe)
x

xg

04/13/2022, 2:58 PM
Thanks, I'll do that!
Found the log message:
Copy code
[2022-04-13 17:08:45.122] [exthost] [error] TypeError: Cannot read properties of undefined (reading 'fname')
    at /Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:2:147866
    at Array.find (<anonymous>)
    at Function.l.sortNotesAtLevel (/Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:2:147852)
    at Ui.parseTree (/Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:8:3244131)
    at /Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:8:3244507
    at Array.map (<anonymous>)
    at Ui.parseTree (/Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:8:3244219)
    at /Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:8:3243417
    at Array.flatMap (<anonymous>)
    at Ui.getChildren (/Users/jodfo01/.vscode/extensions/dendron.dendron-0.90.0/dist/extension.js:8:3243387)
    at _.fetchChildrenNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:19383)
    at _.getChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:15769)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:18806
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
I've isolated the error to a single file. Something in the file name is causing the error...
k

kevins8

04/13/2022, 3:19 PM
so looks like its happening at this line > https://github.com/dendronhq/dendron/blob/master/packages/common-all/src/util/treeUtil.ts#L130:L130 this happens where theres a note without the right frontmatter
are you able to share the filename or the frontmatter of the file?
x

xg

04/13/2022, 3:21 PM
I tried renaming the file and the error went away, then renamed the file back (had old name in clipboard) and the error surfaced again
here is the filename, not sure if everything will survive going through Discord though:
tdde44.vt23.inför-vt23
oh, .md as the extension
I moved the note and then created a note via the lookup command, copying and pasting the text from above and am getting the error 🙂
k

kevins8

04/13/2022, 3:28 PM
just to make sure i got this right: i'm pasting the prompt into a new workspace and it seems to be working https://www.loom.com/i/ed8460b9879e46348345d29a1b317148 might be that discord is transforming the formatting. if you copy the discord filename
tdde44.vt23.inför-vt23
in lookup inside a new workspace, do you still see an error?
x

xg

04/13/2022, 3:32 PM
I'll try that
Nope, not getting it in a clean new dendron workspace
I have managed to create a small (three markdownfiles) dendron only workspace where this error occurs. I have had issues with dropbox earlier, so I am only doing local files since then. Should I create an issue on github and attach the workspace, or should I attach it to a message here?
k

kevins8

04/13/2022, 3:46 PM
an issue would be great 🙏
something with dropbox - i believe it normalizes all non-ascii characters
x

xg

04/13/2022, 3:47 PM
... nevermind... I just unzipped my zip-file in another folder and the error has dissappeared 🤷
k

kevins8

04/13/2022, 3:50 PM
its most likely a dropbox issue - see their naming recommendations: https://help.dropbox.com/files-folders/sort-preview/file-names i've seen odd things happen in the sync when names fall outside of this convention
x

xg

04/13/2022, 3:51 PM
everything now is local though. issue also resolves if I make a copy of my workspace and open that instead (everything local)
k

kevins8

04/13/2022, 3:57 PM
ah - got it, misunderstood the dropbox comment from earlier. do you switch between operating systems/file systems?
if you don't unzip & zip, does the error still show? if so, feel free to upload them individually to the issue
x

xg

04/13/2022, 3:59 PM
only one OS, if I manage to isolate and reproduce this consistantly I'll create an issue! Thanks for your time!
3 Views