{"record":{"id":"083b52fb71a94dc9","repo":"paperclipai/paperclip","slug":"readiness-check-failed-could-not-resolve-health-u","errorCode":null,"errorMessage":"Readiness check failed: could not resolve health URL for ${input.url}","messagePattern":"Readiness check failed: could not resolve health URL for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/workspace-runtime.ts","lineNumber":4781,"sourceCode":"export async function waitForRuntimeServiceReadiness(input: {\n  service: Record<string, unknown>;\n  serviceName?: string | null;\n  command?: string | null;\n  url: string | null;\n  readinessUrl: string | null;\n  fetchImpl?: typeof fetch;\n  now?: () => number;\n}) {\n  const readiness = parseObject(input.service.readiness);\n  const readinessType = asString(readiness.type, \"\");\n  const readinessTargetUrl = input.readinessUrl ?? input.url;\n  if (readinessType !== \"http\" || !readinessTargetUrl) return;\n  const readinessUrl = resolveRuntimeServiceHealthUrl(readinessTargetUrl, {\n    serviceName: input.serviceName,\n    command: input.command,\n  });\n  if (!readinessUrl) {\n    throw new Error(`Readiness check failed: could not resolve health URL for ${input.url}`);\n  }\n  const fetchImpl = input.fetchImpl ?? fetch;\n  const now = input.now ?? Date.now;\n  const timeoutSec = resolveWorkspaceRuntimeReadinessTimeoutSec(input.service);\n  const intervalMs = Math.max(100, asNumber(readiness.intervalMs, 500));\n  const deadline = now() + timeoutSec * 1000;\n  let lastError = \"service did not become ready\";\n  while (now() < deadline) {\n    const probeBudgetMs = Math.max(1, Math.min(RUNTIME_SERVICE_READINESS_PROBE_TIMEOUT_MS, deadline - now()));\n    try {\n      const response = await fetchImpl(readinessUrl, { signal: AbortSignal.timeout(probeBudgetMs) });\n      if (response.ok) return;\n      lastError = `received HTTP ${response.status}`;\n    } catch (err) {\n      lastError = err instanceof Error ? err.message : String(err);\n    }\n    if (now() >= deadline) break;\n    await delay(Math.min(intervalMs, Math.max(0, deadline - now())));","sourceCodeStart":4763,"sourceCodeEnd":4799,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/workspace-runtime.ts#L4763-L4799","documentation":"waitForRuntimeServiceReadiness needs to probe an HTTP health URL, but resolveRuntimeServiceHealthUrl could not derive a valid health URL from the provided service/readiness URL. The readiness check cannot run without a target.","triggerScenarios":"Thrown at server/src/services/workspace-runtime.ts:4628 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid absolute http(s) URL for the readiness check so a health URL can be resolved.","Fix the service URL configuration so the host and port are known before the readiness check runs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}