janhq/jan · error · Error
LlamaCpp extension not found
Error message
LlamaCpp extension not found
What it means
Thrown in the `updateBackend` path when `ExtensionManager.getByName('llamacpp-extension')` returns null AND no extension in `listExtensions()` matches by constructor-name containing 'llamacpp' or type-string containing 'inference'. The llamacpp extension is the only provider of backend-update capability, so its absence blocks the whole flow.
Source
Thrown at web-app/src/hooks/useBackendUpdater.ts:312
// Get llamacpp extension instance
const allExtensions = ExtensionManager.getInstance().listExtensions()
const llamacppExtension =
ExtensionManager.getInstance().getByName('llamacpp-extension')
let extensionToUse = llamacppExtension
if (!llamacppExtension) {
// Try to find by type or other properties
const possibleExtension = allExtensions.find(
(ext) =>
ext.constructor.name.toLowerCase().includes('llamacpp') ||
(ext.type &&
ext.type()?.toString().toLowerCase().includes('inference'))
)
if (!possibleExtension) {
throw new Error('LlamaCpp extension not found')
}
extensionToUse = possibleExtension
}
if (
!extensionToUse ||
!('getSettings' in extensionToUse) ||
!('updateBackend' in extensionToUse)
) {
throw new Error('Extension does not support backend updates')
}
const extension = extensionToUse as LlamacppExtension
// Use the exact target backend from checkBackendForUpdates if available,
// to avoid mismatches between old/new backend name formats
let targetBackendString = updateState.updateInfo.targetBackendView on GitHub (pinned to fad3f12a14)
Solutions
- Confirm the llamacpp extension is installed and enabled in Settings > Extensions.
- Restart the app so extensions re-register.
- Check the extension's registered name matches 'llamacpp-extension' (or update the fallback matcher).
- Ensure ExtensionManager initialization completed before invoking updateBackend.
Example fix
// before
const llamacppExtension = ExtensionManager.getInstance().getByName('llamacpp-extension')
if (!llamacppExtension) {
const possibleExtension = allExtensions.find((ext) =>
ext.constructor.name.toLowerCase().includes('llamacpp') ||
(ext.type && ext.type()?.toString().toLowerCase().includes('inference'))
)
if (!possibleExtension) {
throw new Error('LlamaCpp extension not found')
}
}
// after
const llamacppExtension = ExtensionManager.getInstance().getByName('llamacpp-extension')
if (!llamacppExtension) {
const possibleExtension = allExtensions.find((ext) =>
ext.constructor.name.toLowerCase().includes('llamacpp') ||
(ext.type && ext.type()?.toString().toLowerCase().includes('inference'))
)
if (!possibleExtension) {
throw new Error(
'LlamaCpp extension not found. Install/enable it in Settings > Extensions and restart.'
)
}
} Defensive patterns
Strategy: type-guard
Validate before calling
const ext = ExtensionManager.getInstance().getByName('llamacpp-extension')
if (!ext) {
toast.error('LlamaCpp extension missing', { description: 'Enable it in Settings > Extensions and restart.' })
return
} Type guard
function isLlamacppExtension(ext: unknown): ext is LlamacppExtension {
return !!ext && typeof (ext as any).getSettings === 'function'
} Try / catch
try {
const ext = ExtensionManager.getInstance().getByName('llamacpp-extension')
if (!isLlamacppExtension(ext)) {
toast.error('LlamaCpp extension not found', { description: 'Install/enable it and restart.' })
return
}
// proceed
} catch (error) {
console.error('updateBackend:', error)
throw error
} Prevention
- Ensure extensions finish registering before invoking update flows.
- Keep the registered name stable across versions or update the lookup.
- Disable shadowing extensions whose names match the fuzzy fallback.
When it happens
Trigger: The llamacpp extension is not installed, not registered under the expected name 'llamacpp-extension', and its constructor/type strings changed so the fuzzy fallback fails. Common after an app upgrade that renamed the extension or changed its registered name.
Common situations: Extension renamed in a new build (e.g. 'llamacpp' vs 'llamacpp-extension'); extension disabled/uninstalled; ExtensionManager not yet populated at the time of the call (timing/init race).
Related errors
- Extension does not support backend updates
- Backend update failed: ${result.reason}
- Backend update failed
- Invalid backend string: ${targetBackendString} supplied to u
- Invalid backend string format: "${targetBackendString}". Exp
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/712b960a0e3e2f74.
Report an issue: GitHub.