{"record":{"id":"3e92f1e098c23e0a","repo":"jdx/mise","slug":"podman-pull-succeeded-but-printed-no-image-id","errorCode":null,"errorMessage":"podman pull succeeded but printed no image ID","messagePattern":"podman pull succeeded but printed no image ID","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/oci/run.rs","lineNumber":287,"sourceCode":"fn load_image(engine: Engine, image_dir: &Path) -> Result<String> {\n    match engine {\n        Engine::Podman => {\n            let src = format!(\"oci:{}\", image_dir.display());\n            let out = Command::new(\"podman\")\n                .args([\"pull\", \"--quiet\", &src])\n                .output()\n                .wrap_err(\"running `podman pull`\")?;\n            if !out.status.success() {\n                let stderr = String::from_utf8_lossy(&out.stderr);\n                bail!(\"podman pull failed: {}: {stderr}\", out.status);\n            }\n            // `podman pull --quiet` prints just the image ID on stdout.\n            let id = String::from_utf8(out.stdout)\n                .wrap_err(\"podman pull produced non-utf8 output\")?\n                .trim()\n                .to_string();\n            if id.is_empty() {\n                bail!(\"podman pull succeeded but printed no image ID\");\n            }\n            Ok(id)\n        }\n        Engine::Docker => {\n            // Stream the layout into `docker load` as a docker-archive. Pick\n            // a per-invocation tag so concurrent `mise oci run` calls don't\n            // clobber each other — a shared `mise-oci:run` tag would\n            // otherwise race: the second load would overwrite the first\n            // image before the first container started.\n            let tag = format!(\n                \"mise-oci:run-{}-{}\",\n                std::process::id(),\n                std::time::SystemTime::now()\n                    .duration_since(std::time::UNIX_EPOCH)\n                    .map(|d| d.as_nanos())\n                    .unwrap_or(0)\n            );\n            crate::oci::docker_archive::load_into_docker(image_dir, &tag)?;","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/oci/run.rs#L269-L305","documentation":"After a successful `podman pull --quiet`, mise expects the image ID on stdout. If pull reports success (exit 0) but stdout is empty after trimming, mise treats this as an internal invariant violation because it cannot reference the loaded image afterwards.","triggerScenarios":"podman exits 0 but prints nothing on stdout — e.g. unusual podman versions/wrappers that alter `--quiet` output, or stdout redirected/intercepted by a shim.","commonSituations":"Podman wrapper scripts or aliased binaries swallowing stdout; mismatched or very new/old podman versions changing quiet-mode behavior; storage plugin anomalies.","solutions":["Run `podman pull --quiet <src>` manually and verify it prints an image ID","Check that `podman` on PATH is the real binary, not a wrapper swallowing stdout","Update or reinstall podman to a version whose --quiet output matches upstream behavior"],"exampleFix":"// diagnose\n$ podman pull --quiet alpine:latest   # should print a 64-char image ID\n$ type podman                          # ensure it's not a wrapper\n// then retry\n$ mise oci run alpine:latest","handlingStrategy":"fallback","validationCode":"id=$(podman pull --quiet \"$IMAGE\") && [ -n \"$id\" ] || echo 'podman --quiet output unexpected'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep podman at an upstream-supported version; avoid wrapper scripts around it","Spot-check `podman pull --quiet` output after upgrading podman","Invoke the real binary path rather than an aliased/shimmed podman"],"tags":["oci","podman","internal-invariant","empty-output"],"backgroundTag":"internal-invariant-violation","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}