langflow-ai/langflow · error · Error
Failed to download files: ${response.statusText}
Error message
Failed to download files: ${response.statusText} What it means
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.
Source
Thrown at src/frontend/src/controllers/API/queries/file-management/use-get-download-files.ts:46
credentials: getFetchCredentials(),
},
);
} else {
response = await fetch(
`${getURL("FILE_MANAGEMENT", { mode: "batch/" }, true)}`,
{
method: "POST",
body: JSON.stringify(params.ids),
headers: {
"Content-Type": "application/json",
Accept: "application/x-zip-compressed",
},
credentials: getFetchCredentials(),
},
);
}
if (!response.ok) {
throw new Error(`Failed to download files: ${response.statusText}`);
}
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const filename = parseContentDispositionFilename(
response.headers.get("Content-Disposition"),
"files.zip",
);
const link = document.createElement("a");
link.href = url;
link.setAttribute("download", filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(url);View on GitHub (pinned to 976ec789d2)
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.
Defensive patterns
Strategy: validation
Validate before calling
settings = await client.get_settings()
host, port = settings.host, settings.port
if not host or not port:
raise EnvironmentError("LANGFLOW host/port unset; cannot build direct MCP URLs") Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Failed to reload bundle
- Failed to delete MCP Server
- Invalid file type
- HTTP error! status: ${response.status}
- Failed to load models. Please check your provider credential
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/c34a12fc6940fe5d.
Report an issue: GitHub.