{"record":{"id":"9acaee7f5c80fc35","repo":"langflow-ai/langflow","slug":"snapshot-binding-count-mismatch-on-create-flow","errorCode":null,"errorMessage":"Snapshot binding count mismatch on create: {} flow versions vs {} snapshot bindings","messagePattern":"Snapshot binding count mismatch on create: (.+?) flow versions vs (.+?) snapshot bindings","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"src/backend/base/langflow/api/v1/mappers/deployments/helpers.py","lineNumber":568,"sourceCode":") -> dict[UUID, str]:\n    if not flow_version_ids:\n        return {}\n    bindings = deployment_mapper.util_create_snapshot_bindings(\n        result=result,\n    )\n    bindings_by_source_ref = bindings.to_source_ref_map()\n    if not bindings_by_source_ref:\n        msg = \"Deployment provider create result is missing required snapshot bindings.\"\n        raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n    expected_source_ref_to_flow_version_id = {\n        str(flow_version_id): flow_version_id for flow_version_id in flow_version_ids\n    }\n    if len(bindings_by_source_ref) != len(expected_source_ref_to_flow_version_id):\n        msg = (\n            f\"Snapshot binding count mismatch on create: {len(expected_source_ref_to_flow_version_id)} \"\n            f\"flow versions vs {len(bindings_by_source_ref)} snapshot bindings\"\n        )\n        raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n    snapshot_id_by_flow_version_id: dict[UUID, str] = {}\n    for source_ref, snapshot_id in bindings_by_source_ref.items():\n        flow_version_id = expected_source_ref_to_flow_version_id.get(source_ref)\n        if flow_version_id is None:\n            msg = f\"Unexpected source_ref in create snapshot bindings: {source_ref}\"\n            raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n        snapshot_id_by_flow_version_id[flow_version_id] = snapshot_id\n    return snapshot_id_by_flow_version_id\n\n\ndef resolve_flow_version_patch_for_update(\n    *,\n    deployment_mapper: BaseDeploymentMapper,\n    payload: DeploymentUpdateRequest,\n) -> tuple[list[UUID], list[UUID]]:\n    patch = deployment_mapper.util_flow_version_patch(payload)\n    return patch.add_flow_version_ids, patch.remove_flow_version_ids\n","sourceCodeStart":550,"sourceCodeEnd":586,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/mappers/deployments/helpers.py#L550-L586","documentation":"Error \"Snapshot binding count mismatch on create: {} flow versions vs {} snapshot bindings\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when the number of snapshot bindings returned by the provider on create does not match the number of attached flow versions.","commonSituations":"See trigger scenarios.","solutions":["Retry the create; the provider returned a mismatched number of snapshot bindings. Report to the provider integration maintainer if reproducible."],"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"}