{"record":{"id":"30955875bcf54de1","repo":"microsoft/aspire","slug":"helm-version-short-failed-detail-aspire-requires-helm-4-2-0","errorCode":null,"errorMessage":"'helm version --short' failed ({detail}). Aspire requires Helm 4.2.0 or later. See https://helm.sh/docs/intro/install/.","messagePattern":"'helm version --short' failed \\((.+?)\\)\\. Aspire requires Helm 4\\.2\\.0 or later\\. See https://helm\\.sh/docs/intro/install/\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Kubernetes/Deployment/HelmVersionValidator.cs","lineNumber":89,"sourceCode":"                onErrorData: line => stderr.AppendLine(line),\n                cancellationToken: cancellationToken).ConfigureAwait(false);\n        }\n        catch (Exception ex) when (ex is not OperationCanceledException)\n        {\n            // ProcessUtil throws when the process itself can't be spawned (helm not on\n            // PATH, permission denied, etc.). The exception message from the runner\n            // is typically a low-level \"No such file or directory\" or\n            // \"permission denied\" that doesn't tell users what to do, so wrap it.\n            throw new InvalidOperationException(\n                $\"Helm CLI not found or could not be invoked. Aspire requires Helm {MinimumHelmVersion} or later. Install it from {InstallDocsUrl} and ensure it is available on your PATH.\",\n                ex);\n        }\n\n        if (exitCode != 0)\n        {\n            var errorText = stderr.ToString().Trim();\n            var detail = string.IsNullOrEmpty(errorText) ? $\"exit code {exitCode}\" : errorText;\n            throw new InvalidOperationException(\n                $\"'helm version --short' failed ({detail}). Aspire requires Helm {MinimumHelmVersion} or later. See {InstallDocsUrl}.\");\n        }\n\n        var rawOutput = stdout.ToString().Trim();\n        if (!TryParseHelmVersion(rawOutput, out var detected))\n        {\n            throw new InvalidOperationException(\n                $\"Could not parse Helm version from 'helm version --short' output: '{rawOutput}'. Aspire requires Helm {MinimumHelmVersion} or later. See {InstallDocsUrl}.\");\n        }\n\n        if (detected < MinimumHelmVersion)\n        {\n            throw new InvalidOperationException(\n                string.Format(\n                    CultureInfo.InvariantCulture,\n                    \"Helm {0} was detected, but Aspire requires Helm {1} or later to deploy Kubernetes resources. Upgrade Helm from {2}.\",\n                    detected,\n                    MinimumHelmVersion,","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Kubernetes/Deployment/HelmVersionValidator.cs#L71-L107","documentation":"Thrown when the 'helm version --short' process runs but exits with a nonzero exit code. The validator includes stderr text (or the exit code when stderr is empty) as the {detail} placeholder so the underlying Helm failure is visible in the message. This means Helm was found and launched, but the version query itself failed.","triggerScenarios":"Running EnsureMinimumVersionAsync (via the Kubernetes Helm deploy pipeline) where 'helm version --short' returns a nonzero exit code - e.g. corrupt/old helm binary, broken KUBECONFIG-independent helm plugins misbehaving at startup, or an unreadable HELM_* environment setting causing helm to abort.","commonSituations":"A broken or partially upgraded helm installation that crashes on startup; helm wrapper scripts that print errors and exit nonzero; enterprise security software blocking execution after spawn; a pinned ancient helm version that no longer supports --short.","solutions":["Run 'helm version --short' manually; the printed error text is embedded in this exception's message, so fix whatever it reports.","Reinstall Helm 4.2.0+ from https://helm.sh/docs/intro/install/ if the binary is corrupt or too old to support 'version --short'.","Clear or fix HELM_* environment variables (HELM_NAMESPACE, HELM_DRIVER, plugin paths) that could make helm abort before printing its version."],"exampleFix":"// before\n$ helm version --short\nError: unknown flag: --short  (helm 2.x)\n// after\n$ brew upgrade helm  # or reinstall from https://helm.sh/docs/intro/install/\n$ helm version --short\nv4.2.0+...","handlingStrategy":"validation","validationCode":"// Pre-check that 'helm version --short' exits 0:\nvar output = await System.Diagnostics.ProcessExtensions.RunAsync(\"helm\", \"version --short\");\nif (output?.ExitCode != 0)\n{\n    Console.Error.WriteLine($\"helm version check failed: {output?.StandardError?.Trim()} - reinstall Helm >= 4.2.0\");\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    await deployAsync();\n}\ncatch (InvalidOperationException ex) when (ex.Message.StartsWith(\"'helm version --short' failed\"))\n{\n    // The failed stderr detail is embedded between parentheses in the message.\n    Console.Error.WriteLine($\"Helm is installed but broken: {ex.Message}\");\n}","preventionTips":["Run 'helm version --short' manually when this fires - its stderr is reproduced in the exception message.","Reinstall Helm cleanly rather than upgrading in place when the binary behaves oddly.","Avoid HELM_* env overrides (HELM_DRIVER, HELM_NAMESPACE, plugin dirs) in deploy environments unless tested.","Pin Helm in CI images to a known-good 4.2.0+ version."],"tags":["helm","cli","version-check","kubernetes"],"backgroundTag":"command-not-found","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}