blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.94k stars 411 forks source link

Indexing not being saved #1683

Open filmgal opened 1 year ago

filmgal commented 1 year ago

What happened?

I just upgraded to version v1.1.8 of Obsidian. Since then, every time I open a vault, it indexes the entire vault. (takes 30 minutes on some vaults). I don't mean the first time I open the vault - I mean every single time I open it.

Could it be because I have indexing turned off in Windows?

The errors I'm getting in the console: "index.html:1 Uncaught (in promise) Error: No available storage method found. at driverPromiseLoop (plugin:dataview:13594:33) 2022-12-22 obsidian.md-1671736511794.log

DQL

No response

JS

No response

Dataview Version

0.5.47

Obsidian Version

1.1.8

OS

Windows

s-blu commented 1 year ago

Hello,

I cannot reproduce that - I, too, use Version 1.1.8 and the logs say

Dataview: all 549 files have been indexed in 0.613s (549 cached, 0 skipped).

The error message shown normally means that the Browser has no access to the localStorage or indexedDB to save data. Combing through the issues you opened #1321 before, and said the error resolved for you after a Windows update, at least temporarly. Is this report connected to #1321 or was the problem gone for a while after your report in #1321?

filmgal commented 1 year ago

Yeah, the last time it did resolve itself after a Windows update. And you are right, I forgot the two were related. I don't have a notification yet about a Windows update but I'll see if I can force one.

mProjectsCode commented 1 year ago

@filmgal

Since then, every time I open a vault, it indexes the entire vault.

Is it dataview that is reindexing the vault or is it obsidian reindexing the vault?

I have a vault with only dataview enabled and for me, obsidian is reindexing my vault about 50% of the time when I open obsidian. grafik

I also have console errors very similar to yours.

Uncaught (in promise) DOMException: Internal error opening backing store for indexedDB.open.
Failed to load cache DOMException: Internal error opening backing store for indexedDB.open.
Uncaught (in promise) Error: No available storage method found.
    at driverPromiseLoop (localforage.js:2733:33)

This does not happen when dataview is disabled.

Debug info:

SYSTEM INFO:
    Obsidian version: v1.1.9
    Installer version: v1.1.9
    Operating system: Windows 10 Enterprise 10.0.19045
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: on
    Live preview: off
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 1
    Restricted mode: off
    Plugins installed: 25
    Plugins enabled: 1
        1: Dataview v0.5.51

RECOMMENDATIONS:
    Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
mProjectsCode commented 1 year ago

I have also noticed, that when this happens, the dataview API will return nothing when queried.

blacksmithgu commented 1 year ago

The new datacore plugin will use LevelDB on-disk to skip IndexedDB, which should hopefully avoid all of the present frustrating index issues.

brianpetro commented 1 year ago

I want to note that that does seem to happen randomly. Seemingly more so recently, which after scanning the similar issues may have something to do with my machine since there hasn't been a recent update. And that the issue is usually fixed after restarting Obsidian.