janhq/jan · error · Error
Backend setup was not successful. Please restart the app in
Error message
Backend setup was not successful. Please restart the app in a stable internet connection.
What it means
Thrown by getDevices() after splitting this.config.version_backend on '/'. The setting must be in the form '<version>/<backend>' (e.g. 'b4000/vulkan'). If either half is empty/falsy, the backend was never resolved, so device enumeration cannot proceed. The misleading 'stable internet connection' text points at the root cause: the backend download/selection step that populates version_backend failed or did not complete.
Source
Thrown at extensions/llamacpp-extension/src/index.ts:3999
if (!touched) return
await invoke<void>('write_yaml', { data: cfg, savePath: configPath })
try {
await this.refreshRouterPreset()
} catch (e) {
logger.warn(
`Failed to restart router after model settings update for ${modelId}`,
e
)
}
}
async getDevices(): Promise<DeviceList[]> {
const cfg = this.config
const [version, backend] = cfg.version_backend.split('/')
if (!version || !backend) {
throw new Error(
'Backend setup was not successful. Please restart the app in a stable internet connection.'
)
}
// set envs
const envs: Record<string, string> = {}
if (this.llamacpp_env) this.parseEnvFromString(envs, this.llamacpp_env)
// Ensure backend is downloaded and ready before proceeding
await this.ensureBackendReady(backend, version)
logger.info('Calling Tauri command getDevices with arg --list-devices')
const backendPath = await getBackendExePath(backend, version)
try {
const dList = await invoke<DeviceList[]>('plugin:llamacpp|get_devices', {
backendPath,
envs,
})
// On Linux with AMD GPUs, llama.cpp via Vulkan may report UMA (shared) memory as device-local.View on GitHub (pinned to fad3f12a14)
Solutions
- Ensure the app had network access on first launch so the backend manifest downloaded and version_backend was populated.
- Restart the app so the setup/init flow re-runs and rewrites version_backend.
- Open settings and confirm the llamacpp backend (and version) is selected; if blank, re-select it.
- Check logs for the backend download/ensure step failing and resolve the underlying fetch error (proxy, disk space, permissions).
Example fix
// before
const devices = await engine.getDevices()
// after
const [version, backend] = (engine.config.version_backend || '').split('/')
if (!version || !backend) {
throw new Error('llamacpp backend not configured yet; finish first-run setup before listing devices')
}
const devices = await engine.getDevices() Defensive patterns
Strategy: validation
Validate before calling
function isVersionBackendConfigured(vb: string | undefined): boolean {
if (!vb) return false
const [v, b] = vb.split('/')
return Boolean(v && b)
}
if (!isVersionBackendConfigured(engine.config.version_backend)) {
throw new Error('Finish first-run backend setup before listing devices')
} Type guard
function isVersionBackend(v: unknown): v is `${string}/${string}` {
return typeof v === 'string' && /^[^/]+\/+[^/]+$/.test(v)
} Try / catch
try {
return await engine.getDevices()
} catch (e) {
if (/Backend setup was not successful/.test(String(e))) {
await waitForBackendReady() // poll setup/init, then retry once
return await engine.getDevices()
}
throw e
} Prevention
- Do not expose device selection until first-run setup completes.
- Validate version_backend format before calling getDevices.
- Surface backend download errors during setup so version_backend is never left blank.
When it happens
Trigger: Calling getDevices() during or before first-run backend setup; version_backend setting is empty, undefined, or malformed (no '/' separator, or trailing/leading slash). Also when the settings migration that writes version_backend has not run for this install.
Common situations: Fresh install where the backend manifest fetch failed (offline/corporate proxy); a settings reset that wiped version_backend; a downgrade/upgraded build whose default version_backend key changed; corrupted persisted settings.
Related errors
- Checksum mismatch for ${name}; the download was corrupt or t
- Import of "${FALLBACK_EMBEDDING_MODEL_ID}" did not complete
- Failed to fetch supported backends: ${error instanceof Error
- ubatch_size (${ubatchSize}) is too small. Minimum required:
- Unable to find a suitable port for MLX model
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/e124be419b7e0473.
Report an issue: GitHub.