{"record":{"id":"d460b6cd3963b824","repo":"Devolutions/UniGetUI","slug":"the-application-did-not-register-an-app-state-prov","errorCode":null,"errorMessage":"The application did not register an app-state provider.","messagePattern":"The application did not register an app-state provider\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":400,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcServer.cs","lineNumber":481,"sourceCode":"            await context.Response.WriteAsJsonAsync(\n                IpcManagerSettingsApi.ListManagers(),\n                IpcJson.Options\n            );\n        }\n\n        private async Task V3_GetAppInfo(HttpContext context)\n        {\n            if (!AuthenticateToken(context.Request.Query[\"token\"]))\n            {\n                context.Response.StatusCode = 401;\n                return;\n            }\n\n            try\n            {\n                await context.Response.WriteAsJsonAsync(\n                    AppInfoProvider?.Invoke()\n                        ?? throw new InvalidOperationException(\n                            \"The application did not register an app-state provider.\"\n                        ),\n                    IpcJson.Options\n                );\n            }\n            catch (InvalidOperationException ex)\n            {\n                context.Response.StatusCode = 400;\n                await context.Response.WriteAsync(ex.Message);\n            }\n        }\n\n        private async Task V3_ShowApp(HttpContext context)\n        {\n            await HandleCommandAsync(\n                context,\n                () =>\n                    ShowAppHandler?.Invoke()","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcServer.cs#L463-L499","documentation":"V3_GetAppInfo throws when AppInfoProvider is null: the host never registered a delegate describing its application state. Both the GUI host and HeadlessIpcHost assign AppInfoProvider, so a null provider means a bare or not-yet-configured IpcServer instance is serving requests.","triggerScenarios":"Calling /app-info against a server constructed without assigning AppInfoProvider, or before host initialization completes.","commonSituations":"A custom embedding creates an IpcServer but skips handler wiring; a request races in before Start() finishes setup.","solutions":["Assign AppInfoProvider before calling IpcServer.Start()","Use HeadlessIpcHost or the GUI host instead of a bare IpcServer","Gate requests until the host reports initialized"],"exampleFix":"// before\nvar server = new IpcServer();\nawait server.Start(); // AppInfoProvider never set\n// after\nvar server = new IpcServer { AppInfoProvider = BuildAppInfo };\nawait server.Start();","handlingStrategy":"validation","validationCode":"// Host side: assert wiring before Start\nif (server.AppInfoProvider is null)\n    throw new InvalidOperationException(\"AppInfoProvider must be set before Start()\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never serve on a bare IpcServer; use the provided hosts","Assign all capability delegates before Start()"],"tags":["ipc","app-state","configuration"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}