jdx/mise · error
flatpak cannot install a pinned version
Error message
flatpak cannot install a pinned version ('{pkg}') What it means
Flatpak cannot install a specific version of an application — it only tracks branches/remotes. The Flatpak manager's install() scans the requested PackageRequests and bails if any has a pinned version, because there is no mechanism to honor it.
Solutions
- Remove the version pin and request the package by ID only (flatpak installs its default branch)
- Use a different system package manager that supports pinning if an exact version is required
- Pin via flatpak's own commit if you truly need immutability: `flatpak update --commit=<sha>` manually
Example fix
// before (mise.toml) [tools] "flatpak:org.gimp.GIMP" = "2.10.34" // after [tools] "flatpak:org.gimp.GIMP" = "*"
Defensive patterns
Strategy: validation
Validate before calling
fn uses_pinned_version(reqs: &[PackageRequest]) -> bool {
reqs.iter().any(|r| r.version.is_some())
}
// reject flatpak requests with pins before calling install() Prevention
- Never pin versions for flatpak packages in tool configs
- Use "*" or omit the version for flatpak-managed tools
- Choose a pin-capable backend when exact versions are required
When it happens
Trigger: install() receives a PackageRequest whose `version` field is Some(...) — e.g. a config pinning `flatpak:org.app@1.2.3` or a version-qualified package request routed to the flatpak backend.
Common situations: Users writing tool configs with exact versions for flatpak packages; migrating config from brew/apt (which support pins) to flatpak without dropping the version.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- flatpak failed
- flatpak list failed
- brew bottles are only published for a formula's current…
- brew casks are installed at their current version
- cached rustc output directory has unsupported entries
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/cdfbc41fedf1a240.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/flatpak.rs:148
.args(args)
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
.await?;
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
bail!("flatpak list failed: {}", stderr.trim());
}
Ok(parse_flatpak_list(
&String::from_utf8_lossy(&output.stdout),
pkgs,
))
}
async fn install(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {
if let Some(pkg) = pkgs.iter().find(|pkg| pkg.version.is_some()) {
bail!("flatpak cannot install a pinned version ('{pkg}')");
}
let mut args = vec![
"install".to_string(),
self.scope_arg().to_string(),
"--noninteractive".to_string(),
];
args.extend(pkgs.iter().map(|pkg| pkg.name.clone()));
if opts.dry_run {
miseprintln!("flatpak {}", args.join(" "));
return Ok(());
}
run_flatpak(&args, "install").await
}
async fn upgrade(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {
if pkgs.is_empty() {
return Ok(());
}View on GitHub (pinned to 533346cc37)