Vinzent03 / find-unlinked-files

Find files, which are nowhere linked, so they are maybe lost in your vault.
MIT License
293 stars 14 forks source link

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'end') #51

Closed annekaelber closed 1 year ago

annekaelber commented 1 year ago

Hello,

I'm running: Win 10 Home Obsidian 1.4.2 Find orphaned files and broken links 1.9.0

The attached image is the error I see in the console. (If you came here from a search: Win Ctrl-Shift-I opens the console. That's a capital i, too.)

Here's the text of the error, so others can find this ( but the image is much more legible):

plugin:find-unlinked-files:838 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'end') at FindOrphanedFilesPlugin.eval (plugin:find-unlinked-files:838:54) at step (plugin:find-unlinked-files:68:23) at Object.eval [as next] (plugin:find-unlinked-files:49:53) at fulfilled (plugin:find-unlinked-files:39:58) eval @ plugin:find-unlinked-files:838 step @ plugin:find-unlinked-files:68 eval @ plugin:find-unlinked-files:49 fulfilled @ plugin:find-unlinked-files:39 Promise.then (async)
step @ plugin:find-unlinked-files:41 fulfilled @ plugin:find-unlinked-files:39 Promise.then (async)
step @ plugin:find-unlinked-files:41 eval @ plugin:find-unlinked-files:42 __awaiter @ plugin:find-unlinked-files:38 FindOrphanedFilesPlugin.findEmptyFiles @ plugin:find-unlinked-files:812 callback @ plugin:find-unlinked-files:735 kW @ app.js:1 t.onChooseItem @ app.js:1 t.onChooseSuggestion @ app.js:1 t.selectSuggestion @ app.js:1 e.useSelectedItem @ app.js:1 e.onSuggestionClick @ app.js:1 s @ enhance.js:1

No file gets created, but I still have "broken links output" and "files without tags" and "orphaned files output" from a previous run. I copied the files outside my vault and deleted them from the vault, then ran "find orphaned files". The result is 2600 files that are orphans. I ran "find emptied files" again and got the same error.

Thanks, Anne

find-uncaught-error

luckman212 commented 1 year ago

Came to report the same error...

image

image

Vinzent03 commented 1 year ago

I see now that's a breaking change in the api that was not mentioned in the release notes in the Discord so I didn't know. It's listed here. Fixing now...