janhq/jan · error · Error
Vector DB extension not available
Error message
Vector DB extension not available
What it means
ingestAttachments requires the VectorDB extension (with createCollection and insertChunks APIs) to be registered under window.core.extensionManager. If it is missing or lacks those methods, the extension cannot perform vector ingestion and throws immediately.
Solutions
- Install/enable the Vector DB extension and verify it appears in window.core.extensionManager.get(ExtensionTypeEnum.VectorDB)
- Ensure window.core is initialized before calling ingestAttachments
- Check the Vector DB extension version exposes createCollection and insertChunks
- Wrap the call in try/catch and guide the user to install the extension
Example fix
// before
await rag.ingestAttachments(files)
// after
const vec = window.core?.extensionManager?.get(ExtensionTypeEnum.VectorDB)
if (!vec) throw new Error('Install the Vector DB extension first')
await rag.ingestAttachments(files) Defensive patterns
Strategy: type-guard
Validate before calling
const vec = window.core?.extensionManager?.get(ExtensionTypeEnum.VectorDB) as VectorDBExtension | undefined
if (!vec || typeof vec.createCollection !== 'function' || typeof vec.insertChunks !== 'function') {
throw new Error('Vector DB extension is required for attachment ingestion')
} Type guard
const hasVectorDb = (v: any): v is VectorDBExtension => Boolean(v) && typeof v.createCollection === 'function' && typeof v.insertChunks === 'function'
Try / catch
try {
await rag.ingestAttachments(files)
} catch (e) {
if (e.message === 'Vector DB extension not available') {
// prompt user to install/enable the Vector DB extension
}
} Prevention
- Check extension availability at app startup and degrade features gracefully
- Pin/verify Vector DB extension versions in your app manifest
- Ensure window.core is initialized before any extension-dependent calls
When it happens
Trigger: Calling ingestAttachments when no VectorDB extension is installed, it failed to initialize, or the registered object lacks createCollection/insertChunks methods.
Common situations: Vector DB extension not installed/enabled in the app; extension failed to load at startup; wrong extension version exposing a different API surface; window.core not yet initialized when the call runs.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- llamacpp extension not available
- MLX engine not found
- MLX engine not found
- Conversational extension not available yet
- Database error
AI-assisted analysis of janhq/jan@7205d770c1 (2026-09-17).
Data as JSON: /api/errors/9f947a6436d2a2d8.
Report an issue: GitHub.
Appendix: source
Thrown at extensions/rag-extension/src/index.ts:445
): Promise<{
filesProcessed: number
chunksInserted: number
files: AttachmentFileInfo[]
}> {
if (!threadId || !Array.isArray(files) || files.length === 0) {
return { filesProcessed: 0, chunksInserted: 0, files: [] }
}
// Respect feature flag: do nothing when disabled
if (this.config.enabled === false) {
return { filesProcessed: 0, chunksInserted: 0, files: [] }
}
const vec = window.core?.extensionManager.get(
ExtensionTypeEnum.VectorDB
) as unknown as VectorDBExtension
if (!vec?.createCollection || !vec?.insertChunks) {
throw new Error('Vector DB extension not available')
}
// Load settings
const s = this.config
const maxSize = (s?.enabled === false ? 0 : s?.maxFileSizeMB) || undefined
const chunkSize = s?.chunkSizeChars as number | undefined
const chunkOverlap = s?.overlapChars as number | undefined
let totalChunks = 0
const processedFiles: AttachmentFileInfo[] = []
for (const f of files) {
if (!f?.path) continue
if (maxSize && f.size && f.size > maxSize * 1024 * 1024) {
throw new Error(
`File '${f.name}' exceeds size limit (${f.size} bytes > ${maxSize} MB).`
)
}View on GitHub (pinned to 7205d770c1)