langflow-ai/langflow · error · Error

Restored version contains no flow data

Error message

Restored version contains no flow data

What it means

Catch-all 500 at the end of the is-installed check: any exception outside the per-client inner try (which degrades gracefully to available:false) is logged ('Error checking MCP configuration') and wrapped. It usually means the failure happened at URL building or the project access step rather than in per-client config inspection.

Solutions

  1. Read the logged traceback under 'Error checking MCP configuration'.
  2. If it is the composer URL error, complete the OAuth settings (host/port) via PATCH and retry.
  3. Re-save the project's MCP auth settings so URL builders have all required fields.
Defensive patterns

Strategy: try-catch

Validate before calling

auth = project.auth_settings or {}
if auth.get("auth_type") == "oauth" and not (auth.get("oauth_host") and auth.get("oauth_port")):
    print("complete OAuth host/port before checking install status")

Try / catch

except httpx.HTTPStatusError as e:
    if e.response.status_code == 500 and "checking MCP" in e.response.json().get("detail", ""):
        verify_oauth_settings_complete(); retry_after_fix()

Prevention

When it happens

Trigger: GET the install-check route when get_composer_streamable_http_url/get_composer_sse_url raise (e.g. missing oauth_host/oauth_port — see the composer URL ValueError), or verify_project_access fails with a non-HTTP exception.

Common situations: Project has OAuth auth_type but composer host/port were never populated in auth settings; partially written auth settings after a failed PATCH.

Related errors


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

Appendix: source

Thrown at src/frontend/src/hooks/flows/use-restore-version.ts:37

  const restore = useCallback(
    async (
      versionId: string,
      options?: { saveDraft?: boolean; onSuccess?: () => void },
    ) => {
      const saveDraft = options?.saveDraft ?? true;
      setIsRestoring(true);
      try {
        // --- Phase 1: API call + canvas application ---
        // Errors here are shown to the user and abort the restore.
        const response = await api.post(
          `${getURL("FLOWS")}/${flowId}/versions/${versionId}/activate`,
          null,
          { params: { save_draft: saveDraft } },
        );
        const updatedFlow = response.data;

        if (!updatedFlow.data) {
          throw new Error("Restored version contains no flow data");
        }

        queryClient.invalidateQueries({ queryKey: ["useGetFlowVersions"] });
        applyFlowToCanvas(updatedFlow);
        // biome-ignore lint/suspicious/noExplicitAny: legacy
      } catch (err: any) {
        const apiDetail = err?.response?.data?.detail;
        const message = apiDetail ?? err?.message ?? "Unknown error";
        setErrorData({
          title: t("errors.failedToRestoreVersion"),
          list: [message],
        });
        setIsRestoring(false);
        return;
      }

      // --- Phase 2: Post-restore cleanup ---
      // The restore succeeded. Errors here are logged but should not

View on GitHub (pinned to 976ec789d2)