{"record":{"id":"47db1e9538fc9ea5","repo":"langflow-ai/langflow","slug":"build-job-not-found","errorCode":null,"errorMessage":"Build job not found","messagePattern":"Build job not found","errorType":"exception","errorClass":"Error","httpStatus":404,"severity":"error","filePath":"src/frontend/src/utils/buildUtils.ts","lineNumber":407,"sourceCode":"        onBuildComplete,\n        onBuildError,\n        onGetOrderSuccess,\n        onValidateNodes,\n      };\n\n      return performStreamingRequest({\n        method: \"GET\",\n        url: eventsUrl,\n        onData: async (event) => {\n          const type = event[\"event\"];\n          const data = event[\"data\"];\n          return onEvent(type, data, buildResults, eventCallbacks);\n        },\n        onDataBatch: (events) =>\n          processBatchedEvents(events, buildResults, eventCallbacks, onEvent),\n        onError: (statusCode) => {\n          if (statusCode === 404) {\n            throw new Error(\"Build job not found\");\n          }\n          throw new Error(\"Error processing build events\");\n        },\n        onNetworkError: (error: Error) => {\n          if (error.name === \"AbortError\") {\n            onBuildStopped && onBuildStopped();\n            return;\n          }\n          onBuildError!(\"Error Building Component\", [\n            \"Network error. Please check the connection to the server.\",\n          ]);\n        },\n        buildController,\n      });\n    } else {\n      const callbacks = {\n        onBuildStart,\n        onBuildUpdate,","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/utils/buildUtils.ts#L389-L425","documentation":"Thrown by buildUtils when the GET request to stream events for a build job_id returns 404. The build job was created (the initial POST succeeded) but by the time the client subscribes to its event stream, the backend no longer knows the job.","triggerScenarios":"Subscribing to /build/{job_id}/events after the job expired (in-memory job registry cleared), the backend restarted between POST and GET, or multiple replicas behind a load balancer routed the events GET to an instance that never hosted the job.","commonSituations":"Backend restart or crash-loop during a build; horizontal scaling without sticky sessions for the events endpoint; long delay between build start and stream open (slow client, suspended tab).","solutions":["Retry the whole build (new POST produces a fresh job_id) — usually succeeds after a transient restart","If running multiple backend replicas, enable sticky sessions or route build job endpoints to a single instance","Check backend restart/crash logs if the error repeats on every build","Avoid backgrounding/suspending the tab between starting a build and watching its events"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await subscribeToBuildEvents(job_id);\n} catch (e) {\n  if (e instanceof Error && e.message === \"Build job not found\") {\n    const { job_id: fresh } = await startBuildJob(postData); // full retry with a new job\n    await subscribeToBuildEvents(fresh);\n  } else throw e;\n}","preventionTips":["Subscribe to the events stream immediately after the build POST — don't delay between the two calls","Use sticky sessions or single-instance routing when scaling the backend horizontally","Watch for backend restarts (deploy/oom) coinciding with builds"],"tags":["frontend","build","streaming","http-404","scaling"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}