mudler/LocalAI · error · Error

No job ID returned from server

Error message

No job ID returned from server

What it means

Thrown by the legacy model-editor UI's import submit when the import-job response contains neither result.uuid nor result.ID, so the client has no job identifier to poll (startJobPolling is only started when an ID exists). isSubmitting is reset in the catch so the form becomes usable again.

Source

Thrown at core/http/views/model-editor.html:910

                let successMsg = 'Import started! Tracking progress...';
                if (hasSize || hasVram) {
                    const parts = [];
                    if (hasSize) parts.push('Size: ' + result.estimated_size_display);
                    if (hasVram) parts.push('VRAM: ' + result.estimated_vram_display);
                    successMsg += ' (' + parts.join(' · ') + ')';
                }

                if (result.uuid) {
                    this.currentJobId = result.uuid;
                    this.showAlert('success', successMsg);
                    this.startJobPolling();
                } else if (result.ID) {
                    // Fallback for different response format
                    this.currentJobId = result.ID;
                    this.showAlert('success', successMsg);
                    this.startJobPolling();
                } else {
                    throw new Error('No job ID returned from server');
                }
            } catch (error) {
                this.showAlert('error', 'Failed to start import: ' + error.message);
                this.isSubmitting = false;
            }
        },
        
        startJobPolling() {
            if (this.jobPollInterval) {
                clearInterval(this.jobPollInterval);
            }
            
            this.jobPollInterval = setInterval(async () => {
                if (!this.currentJobId) {
                    clearInterval(this.jobPollInterval);
                    return;
                }
                

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Inspect the import POST response body in devtools to see what was actually returned
  2. If it is an error envelope, address the underlying import error (bad tarball, unknown backend)
  3. If a proxy HTML page, fix proxy routing for the import endpoint
  4. If version skew, re-fetch the model-editor.html asset (hard reload) to match the server

Example fix

// before
} else {
    throw new Error('No job ID returned from server');
}

// after: include whatever came back
} else {
    throw new Error('No job ID returned from server: ' + JSON.stringify(result).slice(0, 200));
}
Defensive patterns

Strategy: type-guard

Type guard

function isImportJob(result) {
  return !!result && typeof result === 'object'
    && (typeof result.uuid === 'string' && result.uuid.length > 0
        || typeof result.ID === 'string' && result.ID.length > 0)
}

Try / catch

try {
  const result = await response.json()
  if (!isImportJob(result)) {
    throw new Error('Unexpected import response: ' + JSON.stringify(result).slice(0, 200))
  }
  this.currentJobId = result.uuid || result.ID
  this.startJobPolling()
} catch (error) {
  this.showAlert('error', 'Failed to start import: ' + error.message)
  this.isSubmitting = false
}

Prevention

When it happens

Trigger: POST to the import endpoint returns 200 with an unexpected body shape — e.g. an error envelope {error: ...} with success omitted, a proxied/HTML response parsed as JSON-without-id, or a server version whose import route returns a different field name.

Common situations: Version skew between the static model-editor.html view and a newer/older API; reverse proxy returning an HTML error page with 200; import rejected immediately (validation) so no job was ever created.

Related errors


AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15). Data as JSON: /api/errors/8d2be82b13de83a9. Report an issue: GitHub.