langflow-ai/langflow · error · Error
An error occurred while uploading the file
Error message
An error occurred while uploading the file
What it means
404 from the is-installed check endpoint: the owner-scoped Folder lookup (id + user_id) found nothing before any config inspection happens. Identical semantics to the other project 404s — deleted, foreign, or mistyped project id.
Source
Thrown at src/frontend/src/hooks/files/use-upload-file.ts:113
.split("/")
.filter(Boolean)
.pop();
if (relativeParts.length > 0 && serverLeaf) {
relativeParts[relativeParts.length - 1] = serverLeaf;
setRelativePathForServerPath(res.path, relativeParts.join("/"));
} else {
setRelativePathForServerPath(res.path, file.webkitRelativePath);
}
}
filesIds.push(res.path);
}
return filesIds;
} catch (e: any) {
const errorMessage =
e?.response?.data?.detail ||
e?.message ||
"An error occurred while uploading the file";
throw new Error(errorMessage);
}
};
return uploadFile;
};
export default useUploadFile;
View on GitHub (pinned to 976ec789d2)
Solutions
- Refresh the project list and use the current project id.
- Confirm the authenticated user owns the folder.
- Re-open the project page so the SPA re-fetches ids.
Defensive patterns
Strategy: validation
Validate before calling
owned = {str(p.id) for p in await client.list_projects()}
assert str(project_id) in owned, "stale project id — refetch before install-check" Try / catch
except httpx.HTTPStatusError as e:
if e.response.status_code == 404:
await refresh_project_ids() Prevention
- Refetch project ids after any delete/recreate of projects.
- Don't cache project ids across user sessions.
When it happens
Trigger: GET /api/v1/mcp/projects/{project_id}/install/check (status route) after the project was deleted, with a project id owned by another user, or with a stale id cached by the UI.
Common situations: UI page left open across a project deletion/recreation; account switch; copying project ids between instances.
Related errors
- reload-in-progress
- Failed to load file (HTTP ${status})
- Failed to install MCP
- Failed to delete MCP Server
- Failed to install MCP
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/0d68881fb51babe1.
Report an issue: GitHub.