Skip to content

HybridStorageAdapter waitForQueryReady times out (60s, repeated) → embeddings skipped, MCP tool calls hang — v5.9.3, idb backend #209

@marketingmaniacs

Description

@marketingmaniacs

Summary

On a fresh install of Nexus 5.9.3, the HybridStorageAdapter never becomes ready — waitForQueryReady times out after 60000 ms repeatedly, the storage adapter init fails, and embeddings are skipped entirely. As a result semantic search / storage tools never work, and when Nexus is used as an MCP server every non-trivial tool call hangs until the client times out.

Environment

Nexus 5.9.3 (latest)
Obsidian 1.12.4
OS macOS 15.7.4
Storage backend idb (per data.jsonpluginStorage.cacheBackend.backend)
Vault ~156 markdown notes, vault stored in a cloud-synced folder
Install age Fresh install same day (little/no Nexus state yet)
MCP usage Used as MCP server via the generated connector.js, Node v20.11.1

Symptom

Obsidian Developer Console on startup (key lines, repeated):

AppWorker exception TypeError: Cannot read properties of undefined (reading 'startsWith')
    at worker.js:1
Metadata failed to parse                                          (app.js)
[nexus] ERROR: Failed to list directory .workspaces               (plugin:nexus:6)
[HybridStorageAdapter] waitForQueryReady timed out after 60000 ms  (plugin:nexus:840)   ← repeats 47×
[PluginLifecycleManager] Storage adapter failed to initialize; skipping embeddings  (plugin:nexus:2241)

.workspaces/ does exist at vault root (with subdirectories), so it is not a missing-directory problem — the worker that backs storage appears to crash on init ("Metadata failed to parse" / startsWith on undefined), after which waitForQueryReady can never resolve.

What works vs. what doesn't

  • ✅ Obsidian Local REST API plugin (running alongside) is fully healthy — GET /vault/ → 200, etc.
  • ✅ Lightweight MCP calls (e.g. tool capability / --help) succeed — the connector itself is fine.
  • ❌ Any MCP call that touches storage/search (search, storage list) hangs and times out after ~4 min on the client side.
  • ❌ No cache.db is ever created in the plugin directory → semantic index never builds.

Storage state (data.json, sanitized)

"pluginStorage": {
  "storageVersion": 2,
  "sourceOfTruthLocation": "vault-root",
  "migration": { "state": "not_needed", "legacySourcesDetected": [], "activeDestination": "Nexus/data" },
  "cacheBackend": { "backend": "idb", "migrationState": "verified", "migratedAt": 1778832546691 }
}

cacheBackend.migrationState is "verified" with a migratedAt timestamp, yet the adapter still fails — the worker appears to read persisted metadata it cannot parse (Metadata failed to parse + Cannot read properties of undefined (reading 'startsWith')).

Impact

Storage adapter failing to initialize cascades into: no embeddings, no semantic search, and (when used as an MCP server) every storage/search tool call hangs for minutes. The plugin is effectively unusable for its core features in this state.

Notes

  • Latest version (5.9.3), no matching existing issue found.
  • Happy to provide the full console log, expanded error objects, or test a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions