Devolutions/UniGetUI · warning · InvalidOperationException
The current UniGetUI session cannot be shut down through aut
Error message
The current UniGetUI session cannot be shut down through automation.
What it means
V3_QuitApp throws when QuitAppHandler is null: the session disallows automation-initiated shutdown. GUI and HeadlessIpcHost both register a real handler; null indicates an unconfigured host or a deliberate policy to block remote quit.
Source
Thrown at src/UniGetUI.Interface.IpcApi/IpcServer.cs:524
private async Task V3_NavigateApp(HttpContext context)
{
await HandleCommandAsync(
context,
() =>
NavigateAppHandler?.Invoke(BuildAppNavigateRequest(context.Request))
?? throw new InvalidOperationException(
"The current UniGetUI session cannot navigate application pages."
)
);
}
private async Task V3_QuitApp(HttpContext context)
{
await HandleCommandAsync(
context,
() =>
QuitAppHandler?.Invoke()
?? throw new InvalidOperationException(
"The current UniGetUI session cannot be shut down through automation."
)
);
}
private async Task V3_ListOperations(HttpContext context)
{
await HandleReadAsync(context, IpcOperationApi.ListOperations);
}
private async Task V3_GetOperation(HttpContext context)
{
await HandleReadAsync(
context,
() => IpcOperationApi.GetOperation(GetRequiredRouteValue(context, "operationId"))
);
}
View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Register QuitAppHandler before Start()
- Check IpcAppInfo.CanQuit before calling quit-app
- If remote shutdown must be blocked, leave it null and treat the error as expected
Example fix
// before await QuitAppAsync(); // after var info = await GetAppInfoAsync(); if (!info.CanQuit) return Result.Unsupported(); await QuitAppAsync();
Defensive patterns
Strategy: validation
Validate before calling
var info = await GetAppInfoAsync();
if (!info.CanQuit)
return Result.Unsupported("session cannot be shut down");
await QuitAppAsync(); Prevention
- Read CanQuit before quit automation
- Decide deliberately whether to wire QuitAppHandler
When it happens
Trigger: Calling quit-app against a host whose QuitAppHandler was never set.
Common situations: Custom embed that does not wire quit; a security policy that intentionally leaves it null to prevent remote shutdown.
Related errors
- The current UniGetUI session cannot show a window.
- The current UniGetUI session cannot navigate application pag
- The manager "{managerId}" does not support installer downloa
- The current UniGetUI session cannot open package details.
- GitHub request failed with HTTP {(int)response.StatusCode} (
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/14544dcc96f53115.
Report an issue: GitHub.