janhq/jan · warning · Error
Backend installed but failed to refresh UI: ${String(e)}
Error message
Backend installed but failed to refresh UI: ${String(e)} What it means
The backend archive was successfully installed and normalized, but the post-install UI refresh (refreshBackendOptions) threw an error. The install itself is complete, but the UI/settings state may be inconsistent. The error is re-thrown to signal that the user may need to restart the app to see the new backend.
Source
Thrown at extensions/llamacpp-extension/src/index.ts:2944
}
}
}
if (!(await fs.existsSync(expectedBinPath))) {
await fs.rm(backendDir)
throw new Error(
'Not a supported backend archive! Missing llama-server binary.'
)
}
try {
await this.refreshBackendOptions()
logger.info(
`Backend ${backendIdentifier}/${version} installed and UI refreshed`
)
} catch (e) {
logger.error('Backend installed but failed to refresh UI', e)
throw new Error(
`Backend installed but failed to refresh UI: ${String(e)}`
)
}
}
/**
* Install the supplementary CUDA runtime DLLs that upstream ships separately
* (`cudart-llama-bin-<backend>.zip`) into every installed backend of that
* type, so llama-server can resolve cublas/cudart at launch.
*/
async installCudaRuntime(path: string): Promise<void> {
if (
!(await fs.existsSync(path)) ||
(!path.endsWith('tar.gz') && !path.endsWith('zip'))
) {
throw new Error(`Invalid path or file ${path}`)
}
View on GitHub (pinned to fad3f12a14)
Solutions
- Restart the application — the backend is installed on disk and will be discovered on next launch.
- If the error persists, check the settings file for corruption and verify the settings store is writable.
- Manually trigger a backend options refresh from the UI after restart.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await extension.installBackend(path)
} catch (e) {
if (e instanceof Error && e.message.includes('failed to refresh UI')) {
// Backend IS installed; just needs a restart to appear in UI
console.warn('Backend installed; restart the app to see it in the UI')
} else {
throw e
}
} Prevention
- After installing a backend, restart the app if the UI doesn't refresh automatically.
- Avoid triggering installs during app shutdown to prevent settings-store conflicts.
- Ensure no other process is writing to the settings file during install.
When it happens
Trigger: refreshBackendOptions throws: it reads installed backends and updates the settings/UI, which can fail if the settings store is locked, the IPC call times out, or there is a serialization error in the backend options data.
Common situations: App is shutting down during the install; settings file is locked by another process; a concurrent settings write causes a read/parse error; the UI was already unmounted.
Related errors
- No supported backend binaries found for this system. Backend
- Failed to fetch supported backends: ${error instanceof Error
- Critical settings "llamacpp_version" / "llamacpp_backend" no
- 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/dc254bb7cc83dd5d.
Report an issue: GitHub.