{"record":{"id":"089146d0e938cba7","repo":"langflow-ai/langflow","slug":"langflow-was-not-able-to-connect-to-the-server-pl","errorCode":null,"errorMessage":"Langflow was not able to connect to the server. Please make sure your connection is working properly.","messagePattern":"Langflow was not able to connect to the server\\. Please make sure your connection is working properly\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/frontend/src/customization/utils/custom-poll-build-events.ts","lineNumber":42,"sourceCode":"): Promise<void> {\n  let isDone = false;\n  while (!isDone) {\n    const response = await fetch(\n      `${url}?event_delivery=${EventDeliveryType.POLLING}`,\n      {\n        method: \"GET\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/x-ndjson\",\n        },\n        signal: abortController.signal,\n        credentials: getFetchCredentials(),\n      },\n    );\n\n    if (!response.ok) {\n      const errorData = await response.json().catch(() => ({}));\n      throw new Error(\n        errorData.detail ||\n          \"Langflow was not able to connect to the server. Please make sure your connection is working properly.\",\n      );\n    }\n\n    const responseText = await response.text();\n\n    if (!responseText.trim()) {\n      await new Promise((resolve) => setTimeout(resolve, 100));\n      continue;\n    }\n\n    const eventLines = responseText.split(\"\\n\").filter((line) => line.trim());\n\n    if (eventLines.length === 0) {\n      await new Promise((resolve) => setTimeout(resolve, 100));\n      continue;\n    }","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/customization/utils/custom-poll-build-events.ts#L24-L60","documentation":"500 with a deliberately opaque message for non-MCPComposerError exceptions while starting MCP Composer during install. The real cause is only in the logs ('Failed to start MCP Composer ...' aerror line); the client just sees the generic text.","triggerScenarios":"Same install flow as above but the failure is an unexpected exception type: OSError spawning the subprocess, KeyError on missing auth fields, httpx errors reaching the composer endpoint.","commonSituations":"PATH issues hiding uvx; auth_settings missing oauth_host/oauth_port keys; transient network failure to the composer's local HTTP port.","solutions":["Match the timestamp of the 500 against server logs to find the exact traceback.","Fix the underlying environmental cause (uvx availability, auth settings completeness, composer port).","Retry install once the composer starts cleanly (check the composer logs)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"except httpx.HTTPStatusError as e:\n    if e.response.status_code == 500 and \"See logs\" in e.response.json().get(\"detail\", \"\"):\n        request_server_logs(since=seconds_ago(30))  # client cannot self-diagnose this one","preventionTips":["Ensure complete OAuth auth settings (host/port) before install.","Keep uvx on PATH for the Langflow service user.","Treat 'See logs for details' as an operator action item, not a client retry."],"tags":["mcp","mcp-composer","install","http-500"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}