{"record":{"id":"c34a12fc6940fe5d","repo":"langflow-ai/langflow","slug":"failed-to-download-files-response-statustext","errorCode":null,"errorMessage":"Failed to download files: ${response.statusText}","messagePattern":"Failed to download files: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts","lineNumber":46,"sourceCode":"          credentials: getFetchCredentials(),\n        },\n      );\n    } else {\n      response = await fetch(\n        `${getURL(\"FILE_MANAGEMENT\", { mode: \"batch/\" }, true)}`,\n        {\n          method: \"POST\",\n          body: JSON.stringify(params.ids),\n          headers: {\n            \"Content-Type\": \"application/json\",\n            Accept: \"application/x-zip-compressed\",\n          },\n          credentials: getFetchCredentials(),\n        },\n      );\n    }\n    if (!response.ok) {\n      throw new Error(`Failed to download files: ${response.statusText}`);\n    }\n\n    const blob = await response.blob();\n    const url = URL.createObjectURL(blob);\n\n    const filename = parseContentDispositionFilename(\n      response.headers.get(\"Content-Disposition\"),\n      \"files.zip\",\n    );\n\n    const link = document.createElement(\"a\");\n    link.href = url;\n    link.setAttribute(\"download\", filename);\n    document.body.appendChild(link);\n    link.click();\n    document.body.removeChild(link);\n\n    URL.revokeObjectURL(url);","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts#L28-L64","documentation":"500 returned when the user switches auth away from OAuth (stopping MCP Composer) and get_project_streamable_http_url() comes back empty, so the response cannot include a direct connection URL. This indicates the direct project MCP server is not addressable — typically because host/port settings are unset or the URL builder failed.","triggerScenarios":"PATCH project MCP settings changing auth_type from oauth to apikey/none with composer stopping, while settings.host or settings.port is empty (or the URL build returns falsy).","commonSituations":"Running Langflow behind a reverse proxy with LANGFLOW_HOST/PORT unset; container deployments where the bind host is not the externally reachable host; partially configured .env.","solutions":["Set host and port in Langflow settings (LANGFLOW_HOST / LANGFLOW_PORT or equivalent) and retry the PATCH.","Inspect get_project_streamable_http_url in the logs to see which input was empty.","For proxy deployments, configure the externally advertised host, not just the bind address."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"settings = await client.get_settings()\nhost, port = settings.host, settings.port\nif not host or not port:\n    raise EnvironmentError(\"LANGFLOW host/port unset; cannot build direct MCP URLs\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set LANGFLOW_HOST/LANGFLOW_PORT (or their settings equivalents) before switching projects off OAuth.","In proxied deployments, configure the externally advertised host so URL builders return non-empty URLs."],"tags":["mcp","oauth","http-500","configuration"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}