obsidian-folder-notes icon indicating copy to clipboard operation
obsidian-folder-notes copied to clipboard

Mystery error

Open menagerie198 opened this issue 1 year ago • 16 comments

I do not have any lapse in performance (that I have noticed) but, I keep getting this error in the Developer Console:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '/') at getEl (plugin:folder-notes:2515:55) at removeCSSClassFromEL (plugin:folder-notes:2500:28) at eval (plugin:folder-notes:2431:7) at Array.forEach () at loadFileClasses (plugin:folder-notes:2425:40) at eval (plugin:folder-notes:5746:9) at t. (app.js:1:2155014) at app.js:1:237228 at Object.next (app.js:1:237333) at a (app.js:1:236051)

Just thought i might be useful to FYI it...

menagerie198 avatar Nov 24 '24 20:11 menagerie198

When do you get this kind of error? I got it once but I don't get it anymore.

LostPaul avatar Dec 28 '24 17:12 LostPaul

image I never noticed an event causing it, but it was always there when i went to the developer window. I just closed and restarted Obsidian, and this is the result...

menagerie198 avatar Dec 28 '24 18:12 menagerie198

I'm getting same error on startup. Potential clue: Not all of my folder notes are getting the bold treatment in File Explorer. Some are bold, and some aren't. I can still click on the non-bold folder names to load the folder note itself. It just seems not to be rendering them all correctly in File Explorer. Possibly related to the error?

frankreporting avatar Jan 31 '25 18:01 frankreporting

Could you both try out the beta version in duplicated version of your vault to see if that changes anything? https://github.com/LostPaul/obsidian-folder-notes/releases/tag/1.7.30-25-beta

LostPaul avatar Feb 04 '25 20:02 LostPaul

Just tried it, and it does appear to have addressed the error. When I reload my main vault, I still see the error in @menagerie198's screenshot. When I switch to a duplicate vault with the beta version swapped in for the official version, I no longer see the error when starting up or reloading.

I didn't do any more extensive testing than that, so this doesn't rule out, say, any settings I have in my main vault vs. the default settings in my default. But it seems promising.

frankreporting avatar Feb 04 '25 20:02 frankreporting

Hi - I used BRAT to install 1.7.30-25-beta. I am getting the following error messages in the dev window.

Image

It means nothing to me, but the reference to 'obsidian-front-matter-title-plugin' strikes me as odd. I may have installed it once, but that would have been a long time ago. There is certainly not a folder by that name in my plugin folder.

menagerie198 avatar Feb 05 '25 11:02 menagerie198

Hi - I used BRAT to install 1.7.30-25-beta. I am getting the following error messages in the dev window.

Image

It means nothing to me, but the reference to 'obsidian-front-matter-title-plugin' strikes me as odd. I may have installed it once, but that would have been a long time ago. There is certainly not a folder by that name in my plugin folder.

It's because I'm using the api to support some features of it I may be able to remove it if you don't have to the plugin installed.

LostPaul avatar Feb 05 '25 21:02 LostPaul

Out of curiosity a (re) installed 'obsidian-front-matter-title-plugin'. On restarting Obsidian I got 182 errors in the inspector! Seems to be one for each of my 'Folder Note' files. 'obsidian-front-matter-title-plugin' does not supply any functionality I need, so if you could easily, un-damagingly remove the dependency, I for one would appreciate it -- one person does not seem to be a terribly compelling reason for such a burden though ;-)

menagerie198 avatar Feb 05 '25 21:02 menagerie198

I also had those warnings: Image

And after I installed the newest https://github.com/LostPaul/obsidian-folder-notes/releases/tag/1.7.30-26-beta I got less warnings: Image

I have the frontmatter title plugin installed and enabled.

Moyf avatar Mar 05 '25 11:03 Moyf

I get this error when I'm hiding the file explorer view when lauching Obsidian. In this case, the file explorer view is defered and not loaded yet, so you can't access FileExplorerView-specific properties. You have to take the defered views into consideration to get rid of this error: https://docs.obsidian.md/Plugins/Guides/Understanding+deferred+views

RyotaUshio avatar Mar 19 '25 12:03 RyotaUshio

@RyotaUshio is to the point. I had Alternate File Tree open and couldn't enable the plugin. I switched to normal file tree (build in obsidian) and I could enable it.

MMoMM-org avatar Apr 08 '25 19:04 MMoMM-org

Currently, I just change the const fileExplorerItem = fileExplorer.view.fileItems.[path]; to const fileExplorerItem = fileExplorer.view.fileItems?.[path]; to avoid this error messages.

Moyf avatar Apr 15 '25 09:04 Moyf

Currently, I just change the const fileExplorerItem = fileExplorer.view.fileItems.[path]; to const fileExplorerItem = fileExplorer.view.fileItems?.[path]; to avoid this error messages.

I've made this change to the next beta release which I also published now

LostPaul avatar Apr 22 '25 18:04 LostPaul

I installed the BETS using BRAT: I now get the following error (but not the one I originally reported.

Image

menagerie198 avatar Apr 22 '25 19:04 menagerie198

I installed the BETS using BRAT: I now get the following error (but not the one I originally reported.

Image

This should only happen when you have this setting enabled can you confirm that?

Image

LostPaul avatar Apr 24 '25 18:04 LostPaul

Doh! Unchecked that option and the error has gone away! Cheers

menagerie198 avatar Apr 24 '25 19:04 menagerie198