{"record":{"id":"672f952e152f12d9","repo":"git-ecosystem/git-credential-manager","slug":"failed-to-start-helper-process-0-1","errorCode":null,"errorMessage":"Failed to start helper process: {0} {1}","messagePattern":"Failed to start helper process: (.+?) (.+?)","errorType":"exception","errorClass":"Trace2Exception","httpStatus":null,"severity":"critical","filePath":"src/Core/Authentication/AuthenticationBase.cs","lineNumber":55,"sourceCode":"                RedirectStandardOutput = true,\n                RedirectStandardError = false, // Do not redirect stderr as tracing might be enabled\n                UseShellExecute = false,\n                StandardOutputEncoding = EncodingEx.UTF8NoBom,\n            };\n\n            Context.Trace.WriteLine($\"Starting helper process: {path} {args}\");\n\n            // We flush the trace writers here so that the we don't stomp over the\n            // authentication helper's messages.\n            Context.Trace.Flush();\n\n            var process = ChildProcess.Start(Context.Trace2, procStartInfo, Trace2ProcessClass.UIHelper);\n            if (process is null)\n            {\n                var format = \"Failed to start helper process: {0} {1}\";\n                var message = string.Format(format, path, args);\n\n                throw new Trace2Exception(Context.Trace2, message, format);\n            }\n\n            // Kill the process upon a cancellation request\n            ct.Register(() => process.Kill());\n\n            // Write the standard input to the process if we have any to write\n            if (standardInput is not null)\n            {\n                await standardInput.BaseStream.CopyToAsync(process.StandardInput.BaseStream, ct);\n                process.StandardInput.Close();\n            }\n\n            IDictionary<string, string> resultDict = await process.StandardOutput.ReadDictionaryAsync(StringComparer.OrdinalIgnoreCase);\n\n            await Task.Run(() => process.WaitForExit(), ct);\n            int exitCode = process.ExitCode;\n\n            if (exitCode != 0)","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/git-ecosystem/git-credential-manager/blob/e8ce762cd04b4100ae637b5fbf39ef9d0a96561e/src/Core/Authentication/AuthenticationBase.cs#L37-L73","documentation":"AuthenticationBase.InvokeHelperAsync launches a UI helper subprocess (git-credential-ui helper) via ChildProcess.Start. If the process cannot be started (returns null), it throws a Trace2Exception with the helper path and arguments so the failure appears in trace2 telemetry.","triggerScenarios":"Calling any authentication flow that delegates to a UI helper (e.g. OAuth/browser or account picker) where ChildProcess.Start fails to spawn the executable at `path` with `args` — missing binary, wrong install layout, or OS spawn failure.","commonSituations":"Broken or partial GCM installation; antivirus blocking process spawn; unsupported environments (headless Linux with GUI helper configured); PATH/deployment issues after upgrades.","solutions":["Reinstall/repair git-credential-manager so all helper binaries exist at the expected location.","Check antivirus/EDR logs and whitelist the GCM helper executable.","Run in a non-interactive-safe mode: set GCM_INTERACTIVE=never or use a credential store that avoids the UI helper.","Verify the helper path printed in the message exists and is executable (chmod +x on Linux/macOS)."],"exampleFix":"// before: helper missing on headless system\nexport GCM_INTERACTIVE=auto\n// after: disable UI helper spawning\nexport GCM_INTERACTIVE=never\n# or provide terminal-only flow\nexport GIT_TERMINAL_PROMPT=1","handlingStrategy":"fallback","validationCode":"test -x \"$(command -v git-credential-manager)\" && echo \"install ok\"","typeGuard":null,"tryCatchPattern":"try { var cred = await InvokeHelperAsync(...); } catch (Trace2Exception ex) when (ex.Message.StartsWith(\"Failed to start helper process\")) { /* fall back to terminal prompt or PAT-based auth */ }","preventionTips":["Reinstall GCM fully after upgrades so helper binaries are present","Whitelist helpers in antivirus/EDR policies","Set GCM_INTERACTIVE=never on headless machines to avoid GUI helper spawning"],"tags":["process","helper","git-credential-manager"],"backgroundTag":"process-spawn-failed","analyzedSha":"e8ce762cd04b4100ae637b5fbf39ef9d0a96561e","analyzedAt":"2026-09-11T17:15:08.753Z","contentChangedAt":"2026-09-11T17:15:08.753Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}