{"record":{"id":"86371c527bc1532f","repo":"Devolutions/UniGetUI","slug":"no-tracked-operation-with-id-operationid-was-f","errorCode":null,"errorMessage":"No tracked operation with id \"{operationId}\" was found.","messagePattern":"No tracked operation with id \"(.+?)\" was found\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcClient.cs","lineNumber":173,"sourceCode":"            {\n                OperationId = operationId,\n            };\n    }\n\n    public async Task<IpcOperationDetails> WaitForOperationAsync(\n        string operationId,\n        int timeoutSeconds = 300,\n        int delayMilliseconds = 1000\n    )\n    {\n        timeoutSeconds = Math.Clamp(timeoutSeconds, 1, 3600);\n        delayMilliseconds = Math.Clamp(delayMilliseconds, 100, 10000);\n\n        DateTime deadline = DateTime.UtcNow.AddSeconds(timeoutSeconds);\n        while (true)\n        {\n            var operation = await GetOperationAsync(operationId)\n                ?? throw new InvalidOperationException(\n                    $\"No tracked operation with id \\\"{operationId}\\\" was found.\"\n                );\n\n            if (\n                operation.Status is \"succeeded\" or \"failed\" or \"canceled\"\n            )\n            {\n                return operation;\n            }\n\n            if (DateTime.UtcNow >= deadline)\n            {\n                throw new InvalidOperationException(\n                    $\"Timed out while waiting for operation {operationId}.\"\n                );\n            }\n\n            await Task.Delay(delayMilliseconds);","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcClient.cs#L155-L191","documentation":"Thrown inside IpcClient.WaitForOperationAsync when GetOperationAsync(operationId) returns null. A null return means the server reported no operation with that id (HTTP 404 or empty body deserialized to null), so the id was never tracked or has already been evicted from the operation registry.","triggerScenarios":"Calling WaitForOperationAsync with an id the server does not know: a typo, an id from a previous (restarted) UniGetUI session whose in-memory operation store was cleared, or an id for an operation that completed and was garbage-collected past the retention window.","commonSituations":"Storing an operation id across a UniGetUI restart. Copying an id by hand and mistyping it. Polling an old id long after it finished and the registry evicted it. Race: requesting output before the server registered the operation.","solutions":["Verify the operation id character-for-character against what the submit endpoint returned.","Re-submit the operation to get a fresh id if UniGetUI was restarted (the in-memory registry does not persist).","Use GetOperationAsync once first to confirm existence before entering the wait loop.","Catch InvalidOperationException around WaitForOperationAsync and treat 'No tracked operation' as a not-found condition."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Probe before waiting:\nvar existing = await client.GetOperationAsync(operationId);\nif (existing is null) { /* id unknown: do not call WaitForOperationAsync */ }","typeGuard":null,"tryCatchPattern":"IpcOperationDetails result;\ntry { result = await client.WaitForOperationAsync(operationId); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"No tracked operation\"))\n{ /* operation id is stale/unknown: resubmit or report not-found */ return; }","preventionTips":["Do not persist operation ids across UniGetUI restarts; the registry is in-memory.","Probe with GetOperationAsync first when the id may be stale.","Distinguish 'not found' from 'timed out' by message when catching."],"tags":["ipc","client","operations","not-found","polling"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}