{"record":{"id":"054a36e00e45f3d1","repo":"git-ecosystem/git-credential-manager","slug":"missing-password-in-response","errorCode":null,"errorMessage":"Missing password in response","messagePattern":"Missing password in response","errorType":"exception","errorClass":"Trace2Exception","httpStatus":null,"severity":"error","filePath":"src/Atlassian.Bitbucket/BitbucketAuthentication.cs","lineNumber":242,"sourceCode":"            }\n\n            IDictionary<string, string> output = await InvokeHelperAsync(helperCommand, promptArgs.ToString());\n\n            if (output.TryGetValue(\"mode\", out string mode) &&\n                StringComparer.OrdinalIgnoreCase.Equals(mode, \"oauth\"))\n            {\n                return new CredentialsPromptResult(AuthenticationModes.OAuth);\n            }\n            else\n            {\n                if (!output.TryGetValue(\"username\", out userName))\n                {\n                    throw new Trace2Exception(Context.Trace2, \"Missing username in response\");\n                }\n\n                if (!output.TryGetValue(\"password\", out string password))\n                {\n                    throw new Trace2Exception(Context.Trace2, \"Missing password in response\");\n                }\n\n                return new CredentialsPromptResult(\n                    AuthenticationModes.Basic,\n                    new GitCredential(userName, password));\n            }\n        }\n\n        public async Task<OAuth2TokenResult> CreateOAuthCredentialsAsync(GitRequest request)\n        {\n            ThrowIfUserInteractionDisabled();\n\n            var browserOptions = new OAuth2WebBrowserOptions\n            {\n                SuccessResponseHtml = BitbucketResources.AuthenticationResponseSuccessHtml,\n                FailureResponseHtmlFormat = BitbucketResources.AuthenticationResponseFailureHtmlFormat\n            };\n","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/git-ecosystem/git-credential-manager/blob/e8ce762cd04b4100ae637b5fbf39ef9d0a96561e/src/Atlassian.Bitbucket/BitbucketAuthentication.cs#L224-L260","documentation":"Companion to the username check: GetCredentialsViaHelperAsync requires a 'password' key in the UI helper's response dictionary. Its absence means the helper returned incomplete credentials, so a GitCredential cannot be constructed and Trace2Exception 'Missing password in response' is thrown.","triggerScenarios":"GetCredentialsAsync -> GetCredentialsViaHelperAsync: output.TryGetValue(\"password\", out password) fails because the helper process output lacks the password field (partial output, helper bug, or non-standard helper).","commonSituations":"Outdated or third-party UI helper binary; helper aborted after emitting username; interference from credential-cache tools truncating helper output.","solutions":["Reinstall/upgrade GCM to restore a matching UI helper binary","Clear conflicting credential helpers/config so the official helper handles the prompt","Enable Trace2 tracing to inspect the helper's returned dictionary and confirm which keys were sent"],"exampleFix":"// before\n// helper output: {\"username\":\"user\"}\n// after\n// helper output: {\"username\":\"user\",\"password\":\"token\"} — reinstall official GCM helper","handlingStrategy":"try-catch","validationCode":"var proc = FindHelperBinary();\nif (proc == null || !File.Exists(proc)) throw new InvalidOperationException(\"UI helper missing/stale\");","typeGuard":"bool HasPassword(Dictionary<string,string> o) => o.TryGetValue(\"password\", out var p) && !string.IsNullOrEmpty(p);","tryCatchPattern":"try { await auth.GetCredentialsAsync(uri, user, modes); }\ncatch (Trace2Exception ex) { trace.Error(ex); return null; } // fall back to manual credential entry","preventionTips":["Reinstall GCM if the helper binary is outdated or third-party","Disable conflicting credential helpers that intercept UI output","Trace helper I/O when debugging automation"],"tags":["ui-helper","ipc","authentication","unexpected-response"],"backgroundTag":"unexpected-response-shape","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"}