diegosouzapw/OmniRoute · error · Error
Service failed to start
Error message
Service failed to start
What it means
Error "Service failed to start" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/services/ServiceSupervisor.ts:283
return await fn();
} finally {
resolve();
}
}
private async waitForHealthy(): Promise<void> {
const timeoutMs = this.config.healthIntervalMs * 3;
const deadline = Date.now() + timeoutMs;
while (Date.now() < deadline) {
if (this.checker.getHealth() === "healthy") return;
// A spawn failure (child 'error' event or sync throw) flips state to
// "error" — stop polling and let start() surface the explicit error
// status as a resolve. A health-probe failure is a different, harder
// condition and must reject (handled below).
if (this.state === "error") {
if (this.spawnFailed) return;
throw new Error(this.lastError ?? "Service failed to start");
}
await new Promise((r) => setTimeout(r, 1_000));
}
// Timeout reached without a healthy probe. The health poller may have
// flipped the state to "error" while we were waiting (FAILURE_THRESHOLD
// consecutive failures) — surface that instead of a degraded marker.
if (this.state === "error") {
if (this.spawnFailed) return;
throw new Error(this.lastError ?? "Service failed to start");
}
this.lastError = sanitizeErrorMessage(
`Health probe did not succeed within ${timeoutMs}ms — service may still be initializing`
);
this.emit("healthDegraded", {
tool: this.config.tool,
timeoutMs,
lastHealth: this.checker.getHealth(),
});View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/services/ServiceSupervisor.ts:283 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/3746596dac438d49.
Report an issue: GitHub.