{"record":{"id":"90b78a64ed82d2be","repo":"langflow-ai/langflow","slug":"component-cache-not-initialized","errorCode":null,"errorMessage":"Component cache not initialized","messagePattern":"Component cache not initialized","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"src/backend/base/langflow/api/v1/flows.py","lineNumber":927,"sourceCode":"    return compress_response(result)\n\n\n@router.post(\"/expand/\", status_code=200, dependencies=[Depends(get_current_active_user)], include_in_schema=False)\nasync def expand_compact_flow_endpoint(\n    compact_data: dict,\n):\n    \"\"\"Expand a compact flow format (minimal nodes/edges) to the full flow format.\"\"\"\n    from lfx.interface.components import component_cache, get_and_cache_all_types_dict\n\n    from langflow.processing.expand_flow import expand_compact_flow\n\n    # Ensure component cache is loaded\n    if component_cache.all_types_dict is None:\n        settings_service = get_settings_service()\n        await get_and_cache_all_types_dict(settings_service)\n\n    if component_cache.all_types_dict is None:\n        raise HTTPException(status_code=500, detail=\"Component cache not initialized\")\n\n    try:\n        return expand_compact_flow(compact_data, component_cache.all_types_dict)\n    except ValueError as e:\n        raise HTTPException(status_code=400, detail=str(e)) from e\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=str(e)) from e\n","sourceCodeStart":909,"sourceCodeEnd":935,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/flows.py#L909-L935","documentation":"Error \"Component cache not initialized\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when a request needs the component cache before it has been initialized during server startup.","commonSituations":"See trigger scenarios.","solutions":["Wait for startup to finish so the component cache initializes, then retry.","Restart the server if the cache failed to initialize; check startup logs."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}