langflow-ai/langflow · warning · Error

File type ${fileExtension} not allowed. Allowed types: ${typ

Error message

File type ${fileExtension} not allowed. Allowed types: ${types?.join(", ")}

What it means

400 returned when the config path resolved for the requested client exists in the schema but its parent directory does not — i.e. that editor has never been installed/started on this machine. The message names the client and asks to install it first.

Source

Thrown at src/frontend/src/hooks/files/use-upload-file.ts:66

        validFiles = filesToUpload.filter((file) => {
          const fileExtension = file.name.split(".").pop()?.toLowerCase();
          return fileExtension && types.includes(fileExtension);
        });

        if (validFiles.length === 0) {
          throw new Error(
            `No supported files found in folder. Allowed types: ${types?.join(", ")}`,
          );
        }
      }

      for (const file of validFiles) {
        validateFileSize(file);
        // Check if file extension is allowed (for non-folder selection)
        if (!webkitdirectory) {
          const fileExtension = file.name.split(".").pop()?.toLowerCase();
          if (!fileExtension || (types && !types.includes(fileExtension))) {
            throw new Error(
              `File type ${fileExtension} not allowed. Allowed types: ${types?.join(", ")}`,
            );
          }
          if (!multiple && filesToUpload.length !== 1) {
            throw new Error("Multiple files are not allowed");
          }
        }

        const res = await uploadFileMutation({
          file,
        });

        if (!webkitdirectory && res?.path) {
          const existing = getRelativePathForServerPath(res.path);
          if (existing && existing.includes("/")) {
            const flatName = String(res.path).split("/").filter(Boolean).pop();
            setRelativePathForServerPath(
              res.path,

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Launch the target editor at least once so it creates its config directory, then retry install.
  2. Verify the expected path exists (e.g. ~/.cursor/mcp.json parent, %APPDATA%/Claude).
  3. If running Langflow in docker, remember /install writes files inside the container — run the install from a Langflow on the same host/user as the editor.
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
config_parents = {"cursor": Path.home() / ".cursor", "claude": Path.home() / "Library/Application Support/Claude"}
if not config_parents.get(client, Path(".")).exists():
    print("Launch the editor once so it creates its config dir, then retry")

Try / catch

except httpx.HTTPStatusError as e:
    if e.response.status_code == 400 and "not installed" in e.response.json().get("detail", ""):
        prompt_user_to_launch_editor()

Prevention

When it happens

Trigger: POST /{project_id}/install with client='claude' on Windows where %APPDATA%\Claude is absent, or client='cursor' with ~/.cursor never created because Cursor was never run.

Common situations: User has Cursor installed but has never opened it (it creates ~/.cursor on first run); installing Claude config on a machine that only has Claude in the browser; wrong user account/home dir in a container.

Related errors


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/3800fea8c938d869. Report an issue: GitHub.