{"record":{"id":"de386af3052b04ce","repo":"firecrawl/firecrawl","slug":"failed-to-start-llms-txt-generation-no-job-id-ret-de386a","errorCode":null,"errorMessage":"Failed to start LLMs.txt generation. No job ID returned.","messagePattern":"Failed to start LLMs\\.txt generation\\. No job ID returned\\.","errorType":"exception","errorClass":"FirecrawlError","httpStatus":500,"severity":"warning","filePath":"apps/js-sdk/firecrawl/src/v1/index.ts","lineNumber":1954,"sourceCode":"  }\n\n  /**\n   * Generates LLMs.txt for a given URL and polls until completion.\n   * @param url - The URL to generate LLMs.txt from.\n   * @param params - Parameters for the LLMs.txt generation operation.\n   * @returns The final generation results.\n   * @deprecated /v1/llmstxt is deprecated and will not be replaced.\n   */\n  async generateLLMsText(url: string, params?: GenerateLLMsTextParams): Promise<GenerateLLMsTextStatusResponse | ErrorResponse> {\n    try {\n      const response = await this.asyncGenerateLLMsText(url, params);\n      \n      if (!response.success || 'error' in response) {\n        return { success: false, error: 'error' in response ? response.error : 'Unknown error' };\n      }\n\n      if (!response.id) {\n        throw new FirecrawlError(`Failed to start LLMs.txt generation. No job ID returned.`, 500);\n      }\n\n      const jobId = response.id;\n      let generationStatus;\n\n      while (true) {\n        generationStatus = await this.checkGenerateLLMsTextStatus(jobId);\n        \n        if ('error' in generationStatus && !generationStatus.success) {\n          return generationStatus;\n        }\n\n        if (generationStatus.status === \"completed\") {\n          return generationStatus;\n        }\n\n        if (generationStatus.status === \"failed\") {\n          throw new FirecrawlError(","sourceCodeStart":1936,"sourceCodeEnd":1972,"githubUrl":"https://github.com/firecrawl/firecrawl/blob/656bffcc2883f1af5befe38766b1ff5f0469993a/apps/js-sdk/firecrawl/src/v1/index.ts#L1936-L1972","documentation":"Thrown by generateLLMsText() (v1, deprecated) when the POST /v1/llmstxt start call returned success but the body has no `id`. Without a job id the SDK cannot poll, so it throws FirecrawlError 500. Indicates a malformed or stub response from a server that does not implement llmstxt.","triggerScenarios":"Self-hosted server without the /v1/llmstxt route; server older than the feature; gateway stripping fields; endpoint stub that returns { success: true } and nothing else.","commonSituations":"Self-hosted Firecrawl predating llmstxt; wrong apiUrl; SDK/server version skew; note the API itself is deprecated and will not be replaced.","solutions":["Confirm the server implements /v1/llmstxt (curl it directly).","Use asyncGenerateLLMsText() and inspect the raw response.","Consider migrating off llmstxt entirely since the API is deprecated.","Match SDK and server versions."],"exampleFix":"// before\nconst r = await app.generateLLMsText('https://example.com');\n\n// after: inspect the raw start response\nconst start = await app.asyncGenerateLLMsText('https://example.com');\nif (!start.success || !('id' in start) || !start.id) {\n  throw new Error(`no job id; raw=${JSON.stringify(start)}`);\n}","handlingStrategy":"type-guard","validationCode":"const start = await app.asyncGenerateLLMsText(url, params);\nif (!start?.success || typeof (start as any).id !== 'string' || !(start as any).id) throw new Error('no id');","typeGuard":"function isLLMsTextStart(r: any): r is { success: true; id: string } {\n  return r && r.success === true && typeof r.id === 'string' && r.id.length > 0;\n}","tryCatchPattern":"try { await app.generateLLMsText(url); }\ncatch (e) { if (/No job ID returned/.test(e.message)) console.error('server did not return id — check llmstxt support'); }","preventionTips":["Confirm the server implements /v1/llmstxt.","Validate start response before polling.","Plan migration off the deprecated llmstxt API."],"tags":["llmstxt","v1","malformed-response","async-job","deprecated"],"analyzedSha":"656bffcc2883f1af5befe38766b1ff5f0469993a","analyzedAt":"2026-08-12T01:18:00.488Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}