jdx/mise · error
flatpak list failed
Error message
flatpak list failed: {} What it means
The Flatpak manager's installed() runs `flatpak list` with both stdout and stderr piped to determine which requested packages are installed. A non-zero exit means the installed-state query itself failed, so it bails with the stderr instead of parsing output.
Solutions
- Run `flatpak list` manually to see the real error
- Repair the installation with `flatpak repair`
- Reinstall flatpak if the binary installation is broken
- Check ~/.local/share/flatpak and /var/lib/flatpak permissions
Example fix
// before $ flatpak list error: ...corrupted... // after $ flatpak repair $ flatpak list
Defensive patterns
Strategy: try-catch
Validate before calling
let out = std::process::Command::new("flatpak").args(["list", "--app"]).output()?;
if !out.status.success() {
// run `flatpak repair` before querying installed packages
} Try / catch
match result {
Err(e) if e.to_string().contains("flatpak list failed") => {
eprintln!("installed-state query failed: {e}; try `flatpak repair`");
}
other => { let _ = other; }
} Prevention
- Keep the flatpak installation healthy (`flatpak repair` after failures)
- Confirm `flatpak list` works standalone before automating queries
When it happens
Trigger: installed() executes `flatpak list ...` and the process exits non-zero — flatpak itself is broken, the installation is corrupted, or arguments/permissions are wrong.
Common situations: Broken flatpak installation (missing runtime dirs); corrupted ~/.local/share/flatpak; container images where flatpak metadata is absent; permission problems on the flatpak repo.
Related errors
- flatpak failed
- flatpak cannot install a pinned version
- a process it started kept its output open
- get failed for
- bootstrap from repository failed with
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/781c3a8a8a80ac83.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/flatpak.rs:138
false
}
async fn installed(&self, pkgs: &[PackageRequest]) -> Result<Vec<PackageStatus>> {
if pkgs.is_empty() {
return Ok(vec![]);
}
let args = ["list", self.scope_arg(), "--columns=application,version"];
debug!("$ flatpak {}", args.join(" "));
let output = tokio::process::Command::new("flatpak")
.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 {View on GitHub (pinned to 533346cc37)