Crosstalk-Solutions/project-nomad · error
Force reinstall failed
Error message
Force reinstall failed
What it means
This error is thrown by the frontend settings page when the call to api.forceReinstallService('nomad_ollama') returns a falsy response or a response with success !== true. It is not a library error; it is a guard for a failed POST to the backend reinstall endpoint, surfacing either the server's message or the generic fallback string.
Source
Thrown at admin/inertia/pages/settings/system.tsx:54
const handleDismissGpuBanner = () => {
setGpuBannerDismissed(true)
try {
localStorage.setItem('nomad:gpu-banner-dismissed', 'true')
} catch {}
}
const handleForceReinstallOllama = () => {
openModal(
<StyledModal
title="Reinstall AI Assistant?"
onConfirm={async () => {
closeAllModals()
setReinstalling(true)
try {
const response = await api.forceReinstallService('nomad_ollama')
if (!response || !response.success) {
throw new Error(response?.message || 'Force reinstall failed')
}
addNotification({
message: 'AI Assistant is being reinstalled with GPU support. This page will reload shortly.',
type: 'success',
})
try { localStorage.removeItem('nomad:gpu-banner-dismissed') } catch {}
setTimeout(() => window.location.reload(), 5000)
} catch (error) {
addNotification({
message: `Failed to reinstall: ${error instanceof Error ? error.message : 'Unknown error'}`,
type: 'error',
})
setReinstalling(false)
}
}}
onCancel={closeAllModals}
open={true}
confirmText="Reinstall"View on GitHub (pinned to 0bd1c6f4f9)
Solutions
- Check the backend logs for the reinstall script's exit status and stderr
- Verify the Ollama service exists and is registered before offering the button (api call to list services)
- Free disk space / verify GPU drivers, then retry the reinstall
- If response shape changed, confirm the endpoint returns {success:boolean, message?:string}
Example fix
// before
const response = await api.forceReinstallService('nomad_ollama')
if (!response || !response.success) {
throw new Error(response?.message || 'Force reinstall failed')
}
// after
const response = await api.forceReinstallService('nomad_ollama')
if (!response?.success) {
throw new Error(response?.message || `Force reinstall failed (HTTP ${response?.status ?? 'no response'})`)
} Defensive patterns
Strategy: try-catch
Validate before calling
const svc = await api.getService('nomad_ollama')
if (!svc?.installed) return notify('Ollama is not installed; nothing to reinstall') Type guard
const isReinstallResponse = (r: unknown): r is { success: boolean; message?: string } =>
typeof r === 'object' && r !== null && typeof (r as any).success === 'boolean' Try / catch
try {
const r = await api.forceReinstallService('nomad_ollama')
if (!r?.success) throw new Error(r?.message || 'Force reinstall failed')
} catch (e) {
addNotification({ message: e instanceof Error ? e.message : 'Force reinstall failed', type: 'danger' })
} finally {
setReinstalling(false)
} Prevention
- Check service installation state before showing the reinstall action
- Keep the button disabled while reinstalling is true
- Include server message in the notification for actionable diagnostics
When it happens
Trigger: POST to the force-reinstall endpoint for the nomad_ollama service returning non-2xx, an empty body, or {success:false} — e.g. the Ollama service is not installed, the box is offline, or the reinstall script exits non-zero.
Common situations: Ollama binary missing on the appliance, insufficient disk space for the GPU-support reinstall package, backend route/auth middleware rejecting the admin request, or network interruption during the request.
Related errors
- Failed to start update
- Ollama service not ready yet
- No response from Ollama
- Failed to fetch update status
- Failed to fetch update logs
AI-assisted analysis of Crosstalk-Solutions/project-nomad@0bd1c6f4f9 (2026-08-27).
Data as JSON: /api/errors/69b73492b0ac0ed7.
Report an issue: GitHub.