Skip to content

[BUG] Obsidian connector shenanigans #817

@hiddengarden

Description

@hiddengarden

Obsidian Connector - Backend Implementation Missing

Summary

The Obsidian connector appears in the UI and can be created via API, but the backend indexing task is not implemented, causing indexing to fail silently.

Environment

  • SurfSense Version: ghcr.io/modsetter/surfsense:latest (as of 2026-02-15)
  • Deployment: Docker Compose / Podman
  • OS: Fedora 43 Silverblue

Steps to Reproduce

Via UI (Broken)

  1. Navigate to Connectors dashboard
  2. Click "Add Connector" → Select Obsidian
  3. Fill in connector form:
    • Connector Name: "Obsidian Vault"
    • Vault Path: /mnt/obsidian
    • Vault Name: "My vault"
    • Exclude Folders: ".obsidian,.trash"
    • Include Attachments: false
    • Enable Periodic Sync: true
    • Sync Frequency: Every hour
  4. Click "Connect Obsidian"
  5. Result: Button does nothing, no network request sent, connector not created

Via API (Partially Works)

  1. Authenticate via /auth/jwt/login
  2. Create connector via POST /api/v1/search-source-connectors:
{
  "name": "Obsidian Vault",
  "connector_type": "OBSIDIAN_CONNECTOR",
  "is_indexable": true,
  "config": {
    "vault_path": "/mnt/obsidian",
    "vault_name": "My vault",
    "exclude_folders": ".obsidian,.trash",
    "include_attachments": false
  },
  "periodic_indexing_enabled": true,
  "indexing_frequency_minutes": 60
}
  1. Result: Connector created successfully (ID: 1)
  2. Trigger indexing via POST /api/v1/search-source-connectors/1/index
  3. Result: Returns success message but indexing fails

Backend Logs

INFO:app.utils.periodic_scheduler:Periodic indexing enabled for connector 1 (frequency: 60 minutes). Triggering first run...
ERROR:app.utils.periodic_scheduler:No task mapping found for connector type: SearchSourceConnectorType.OBSIDIAN_CONNECTOR
WARNING:app.routes.search_source_connectors_routes:Failed to create periodic schedule for connector 1
INFO:app.routes.search_source_connectors_routes:Triggering Obsidian vault indexing for connector 1 into search space 2 from 2025-02-15 to 2026-02-15

The key error: No task mapping found for connector type: SearchSourceConnectorType.OBSIDIAN_CONNECTOR

Expected Behavior

  1. UI connector form should submit and create the connector
  2. Backend should have an index_obsidian_vault task mapped to OBSIDIAN_CONNECTOR type
  3. Indexing should process .md files from the vault path and create documents

Actual Behavior

  1. UI form button is non-functional
  2. API connector creation succeeds but indexing fails
  3. No vault files are processed or indexed

Additional Context

Task List Shows Obsidian Task Exists

From Celery worker logs:

[tasks]
  . index_obsidian_vault
  . index_notion_pages
  . index_slack_messages
  ...

The index_obsidian_vault task is registered, but there's no mapping between SearchSourceConnectorType.OBSIDIAN_CONNECTOR and this task in the periodic scheduler.

Vault Mount Confirmed Working

$ podman exec surfsense ls -la /mnt/obsidian
drwxrwxrwx. 1 root root 48078 Feb 13 23:37 obsidian

The vault is accessible from the container at the configured path.

Workaround

None currently. The connector appears to be a work-in-progress feature.

Suggested Fix

  1. UI Fix: Ensure the "Connect Obsidian" button submits the form and calls the API
  2. Backend Fix: Add task mapping in app/utils/periodic_scheduler.py:
SearchSourceConnectorType.OBSIDIAN_CONNECTOR: index_obsidian_vault
  1. Implement index_obsidian_vault task if it doesn't already have the logic to:
    • Read files from config['vault_path']
    • Parse .md files with YAML frontmatter
    • Extract wiki links [[note]] and tags #tag
    • Respect exclude_folders config
    • Create documents in the search space

Related

  • Obsidian is listed as a supported connector in README
  • Other connectors (Notion, Slack, etc.) work correctly
  • This suggests Obsidian implementation is incomplete

Would appreciate any guidance or timeline for when this connector will be fully functional!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions