Devolutions/UniGetUI · warning · InvalidOperationException
Flatpak does not support installing arbitrary versions
Error message
Flatpak does not support installing arbitrary versions
What it means
Flatpak's GetInstallableVersions_UnSafe unconditionally throws InvalidOperationException. Flatpak installs one commit per branch and has no arbitrary-version catalog, so requesting installable versions is unsupported.
Source
Thrown at src/UniGetUI.PackageEngine.Managers.Flatpak/Helpers/FlatpakPkgDetailsHelper.cs:101
// System-wide installs live under /var/lib/flatpak, per-user installs under
// ~/.local/share/flatpak. Return whichever actually contains the app.
foreach (var baseDir in new[]
{
"/var/lib/flatpak",
Path.Join(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".local", "share", "flatpak"),
})
{
var path = Path.Join(baseDir, "app", package.Id);
if (Directory.Exists(path))
return path;
}
return null;
}
protected override IReadOnlyList<string> GetInstallableVersions_UnSafe(IPackage package)
=> throw new InvalidOperationException("Flatpak does not support installing arbitrary versions");
}
View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Disable the version picker for Flatpak via the capability check.
- Install the default Flatpak branch/commit without a version pin.
- Catch InvalidOperationException and surface only the current/default version.
Example fix
// before
var versions = await pkg.GetInstallableVersionsAsync(); // throws for flatpak
// after
if (pkg.Manager.Capabilities.SupportsArbitraryVersions)
versions = await pkg.GetInstallableVersionsAsync();
else
versions = [pkg.Version]; Defensive patterns
Strategy: validation
Validate before calling
if (package.Manager.Capabilities.SupportsArbitraryVersions)
versions = package.GetInstallableVersionsAsync();
else
versions = new[] { package.Version }; Type guard
static bool CanListVersions(IPackage pkg) =>
pkg.Manager.Capabilities.SupportsArbitraryVersions; Prevention
- Hide the version picker for Flatpak packages.
- Install the default Flatpak branch/commit.
- Centralize the capability check for all no-version managers.
When it happens
Trigger: Any code path that calls GetInstallableVersions on a Flatpak package (version picker, pre-install resolution).
Common situations: UI version dropdown for a Flatpak app; automation assuming a version list exists.
Related errors
- APT does not support installing arbitrary versions
- DNF does not support installing arbitrary versions
- Homebrew does not support installing arbitrary versions
- Pacman does not support installing arbitrary versions
- {expectedName} maintenance actions can only run against the
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/24593fdf239f77bf.
Report an issue: GitHub.