Troubleshooting
This guide will help you troubleshoot common issues with Query All The Things (QATT).
Enable Debug Mode
The easiest way to troubleshoot QATT queries is to enable Debug Mode:
- Open Obsidian Settings
- Navigate to Query All The Things settings
- Under "General Settings", enable "Enable Debug Mode"
- Return to your note with the query codeblock
When Debug Mode is enabled, each query codeblock will display detailed information including:
- Execution status - Whether the query is waiting, executing, or complete
- Timing information - How long each step takes
- Error details - Specific error messages and stack traces
- Query results - Number of results returned
- Render information - Details about the template rendering
Example Debug Output
With Debug Mode enabled, you'll see messages like:
Status: Initializing
Starting query execution...
Time: 5ms | Render ID: :path/to/file.md
Status: Executing Query
Query engine: alasql
Time: 15ms | Render ID: :path/to/file.md
Status: Query Complete
Retrieved 10 result(s)
Time: 45ms | Render ID: :path/to/file.md
Status: Complete
Query executed and rendered successfully. Post-render format: markdown
Time: 120ms | Render ID: :path/to/file.mdValidation Warnings in Debug Mode
When Debug Mode is enabled, you'll also see warnings about potential configuration issues:
⚠️ Configuration Warnings
• Potentially incorrect table name "notes" detected. Did you mean "obsidian_notes"?
• Unknown post render format "custom". Supported values are: "markdown", "micromark", "html", "raw".These warnings help you catch common mistakes before they cause problems.
Per-Query Debug Mode
You can also enable debug mode for individual queries by adding logLevel: debug to your codeblock:
```qatt
logLevel: debug
query: |
SELECT TOP 5 * FROM obsidian_notes
template: |
{{#each result}}
- [[{{path}}|{{basename}}]]
{{/each}}
```Common Issues
Configuration Errors
Symptoms: Red error message appears in the codeblock immediately
What It Means: QATT has detected a problem with your codeblock configuration before attempting to run the query.
Common Configuration Errors:
- Invalid YAML syntax: Check for proper indentation and formatting
- Missing query or template: You must provide either
queryorqueryFile, and eithertemplateortemplateFile - Dataview plugin required: Your query uses Dataview tables but the Dataview plugin is not installed
Example Error:
❌ Configuration Error
• Missing query: You must provide either "query" or "queryFile" in your codeblock configuration.
• Missing template: You must provide either "template" or "templateFile" in your codeblock configuration.
💡 Tip: Check the troubleshooting documentation for common configuration issues.How to Fix:
- Read the error message carefully - it tells you exactly what's wrong
- Check your YAML syntax (indentation matters!)
- Ensure you have both a query and a template defined
- Install required plugins if mentioned in the error
Query Returns No Results
Symptoms: The query executes but shows an empty result
Debug Steps:
- Enable Debug Mode to verify the query is executing
- Check the debug output for "Retrieved X result(s)"
- Test your query in the console:
- Open Obsidian Developer Tools (Ctrl+Shift+I or Cmd+Option+I)
- Run the command "Query All The Things: Report the metrics for the plugin to the console"
- Or test the query manually in the console
Common Causes:
- Wrong table name:
- The correct table name is
obsidian_notes - Common mistakes include using
obsidian_markdown_notes(a legacy table that may not be populated) - Or using
notes(which doesn't exist) - QATT now warns you about incorrect table names when Debug Mode is enabled
- The correct table name is
- Missing data - the notes cache may not be loaded yet
- Incorrect WHERE conditions
Query Not Executing
Symptoms: Nothing appears in the codeblock, no error messages
Debug Steps:
- Enable Debug Mode
- Look for the "Status: Waiting" message
- Check what data is still loading
Common Causes:
- Dataview plugin is not installed (for dataview-backed tables)
- Notes cache is still loading (especially on large vaults)
- YAML syntax error in the codeblock configuration
Solutions:
- Wait for the "Status: Initializing" message to appear
- Check browser console (Ctrl+Shift+I or Cmd+Option+I) for error messages
- Verify YAML syntax - indentation matters!
Syntax Error in Query
Symptoms: Error message appears in the codeblock
Debug Steps:
- Check the error message for the specific issue
- Verify SQL syntax
- Test simpler queries first
Common Causes:
- Missing quotes around string values
- Incorrect table or column names
- SQL syntax errors
Example:
-- Wrong - missing quotes
SELECT * FROM obsidian_notes WHERE basename = MyNote
-- Correct
SELECT * FROM obsidian_notes WHERE basename = 'MyNote'Template Not Rendering
Symptoms: Query executes but template doesn't render properly
Debug Steps:
- Enable Debug Mode
- Check "Render Complete" message
- Verify the template syntax
Common Causes:
- Handlebars syntax errors
- Wrong property names in the template
- Missing
resultin template loops
Example:
```qatt
query: |
SELECT basename FROM obsidian_notes LIMIT 5
template: |
{{#each result}}
- {{basename}}
{{/each}}
```Using Console Commands
QATT provides several console commands for debugging:
View Internal Events:
- Command Palette → "Query All The Things: Will push all the internal events to the console for debugging"
View Tasks:
- Command Palette → "Query All The Things: Will push all the internal obsidian_markdown_tasks table to the console"
View Available Tables:
- Command Palette → "Query All The Things: Dump the in memory tables known by Alasql to the editor"
View Metrics:
- Command Palette → "Query All The Things: Report the metrics for the plugin to the console"
Force Refresh:
- Command Palette → "Query All The Things: Force a refresh of all blocks for QATT"
- Command Palette → "Query All The Things: Force the notes cache to be reloaded"
Checking Browser Console
Advanced troubleshooting often requires checking the browser console:
- Open Developer Tools (Ctrl+Shift+I on Windows/Linux, Cmd+Option+I on Mac)
- Go to the Console tab
- Look for messages prefixed with
[QATT Debug]or timestamped QATT messages - Error messages will appear in red
Getting Help
If you're still having issues:
- Enable Debug Mode and take a screenshot of the debug output
- Check the browser console for error messages
- Create an issue on GitHub with:
- Your query codeblock (sanitize any private data)
- The debug output or error messages
- Your Obsidian version
- QATT plugin version
Performance Issues
If queries are running slowly:
- Check the debug timing information to see which step is slow
- Consider using indexes or limiting result sets
- Avoid querying large amounts of data unnecessarily
- Use the
TOPclause to limit results:SELECT TOP 100 * FROM obsidian_notes
Known Limitations
- QATT depends on Obsidian's metadata cache being loaded
- Large vaults (thousands of notes) may take time to cache on startup
- Dataview-backed tables require the Dataview plugin to be installed
- CustomJS features require the CustomJS plugin to be installed
