sytone/obsidian-queryallthethings

Dataview errors pervent building qatt cache

Closed this issue · 10 comments

Describe the bug
qatt blocks do not render. It seems that dataview interferes the qatt cache building. Tested with Version 1.1.1 to 1.1.3

To Reproduce
Steps to reproduce the behavior:

  1. Open obsidian
  2. open dev console
  3. see error -> screenshots

Expected behavior
qatt blocks render

Screenshots
Dataview refresh error 2024-10-02 15-11-31 +0200

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Obsidian Version: v1.6.7
  • Plugin Version: 1.0.2

Smartphone (please complete the following information):

  • Device: Samsung S10
  • OS: Android
  • Obsidian Version: v1.6.7
  • Plugin Version: 1.0.2

I validated the new build with a clean vault. However dataview was not enabled. I do not have it enabled on my vault either.

I am remote at the moment but if dataview is disabled does the error still happen?

I am considering removing the dataview integration as I do not have larger coverage for it and I no longer use it.

Thanks for your fast replies!

I made a video of a test vault. No dataview, but still no cache building. It's almost as if it just happens randomly that the files are not indexed for/by qatt.

qatt-1.1.3-cache-building-error.mov

I just enabled Dataview on my main vault and things defiantly broke in the settings but no exceptions. I also completely removed it as well as tried it with it installed but disabled and did not see the exceptions you are seeing. Will make a vault shortly to see if I can reproduce.

Ok, I did the following.

  • Created a new vault using Obsidian 1.6.7
  • Enabled plugins
  • Created a set of pages
  • Installed QATT
  • Restarted Obsidian so I had a clean slate
  • Added the below code block to the Welcome page
  • Rendered without any errors in log
  • Installed Dataview
  • Restarted Obsidian so I had a clean slate
  • Went to welcome pages and it rendered the block with no errors.
  • Enabled Dataview
  • Restarted Obsidian so I had a clean slate
  • Went to welcome pages and it rendered the block with no errors.

Query:

query: |
  SELECT * FROM obsidian_notes
template: |
  {{#each result}}
    - {{basename}}
  {{/each}}

I am not sure where these exceptions are coming from. Can you share your data.json in the plugins folder so I can see the settings being used for qatt? There may be something different there? Please ensure you remove and personal information before posting it.

Note: I did have it once not render the block but closing and opening the page I had the query on resolved that. There is still a race condition somewhere on start where a opened page may or may not update after initial cache/debounce window is passed and I have not been able to reproduce.

My testvault, that one of the last video, has qatt-1.1.3.
data.json looks like this:

{
  "onStartSqlQueries": "CREATE TABLE my_lookup(name,birthday);\nINSERT INTO my_lookup VALUES (\"fred\", 2000-02-03);",
  "announceUpdates": false,
  "version": "",
  "mainHeadingOpen": true,
  "generalHeadingOpen": true,
  "internalLoggingConsoleLogLimit": 10,
  "disableDataviewMissingNotification": false,
  "disableCustomJsMissingNotification": false,
  "enableEditorRightClickMenu": true
}

The settings page of qatt does not have a decounce option. Do i have to manually add that?
qatt 1 1 3 settings 2024-10-02 22-53-39 +0200

No, it is missing settings. I saw this when dataview was on. When it was off all settings were showing but I did not see an exception with the creation of settings so that was on the backlog and assumed it was just me.

If you toggle one of the settings and then close and open it do you still just see this limited set?

No, the set of settings still is the same

I don't know why but it currently works. No errors in the console and the debouncing works perfectly. Also, all the settings are now visible 🤷

Ok. So there is something weird with one of the internal services. I'm going to try and remove dataview to see if it happens again. Process of elimination to track this one down.

Have a change that will remove dataview, need to somehow work out impact. Ill add this to roadmap in project plan.