amazon q: authentication fails (ECONNREFUSED)
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
## Steps to reproduce the issue
1. Open VS Code
2. Click on Amazon Q icon on bottom (or chose from the sidebar)
3. Click "Use for Free with BuilderID"
4. Error popup: "Webview error" with the following trace:
2024-10-25 14:36:32.891 [warning] telemetry: invalid Metric: "aws_reportPluginIssue" emitted without the `result` property, which is always required. Consider using `.run()` instead of `.emit()`, which will set these properties automatically. See https://github.com/aws/aws-toolkit-vscode/blob/master/docs/telemetry.md#guidelines
2024-10-25 14:38:36.457 [info] selected AWS ID sign in
2024-10-25 14:38:36.457 [info] auth: Updating connection state of 14e<--obfuscated-->5e8 to authenticating
2024-10-25 14:38:36.457 [info] codewhisperer: connection changed to authenticating: 14e<--obfuscated-->5e8
2024-10-25 14:38:36.458 [info] current client registration id=undefined
expires at undefined
key = 14e<--obfuscated-->5e8
2024-10-25 14:38:36.478 [error] API response (localhost /client/register): { code: 'ECONNREFUSED' }
2024-10-25 14:38:36.494 [error] API response (localhost /client/register): { code: 'ECONNREFUSED' }
2024-10-25 14:38:36.599 [error] API response (localhost /client/register): { code: 'ECONNREFUSED' }
2024-10-25 14:38:36.602 [error] ssoSetup encountered an error: Error: Failed to connect to AWS Builder ID [FailedToConnect]
-> AggregateError: [ECONNREFUSED]
2024-10-25 14:38:36.602 [error] webviewId="aws.amazonq.AmazonCommonAuth": Error: Webview error
-> Error: Webview backend command failed: "startCodeWhispererBuilderIdSetup()"
-> Error: Failed to connect to AWS Builder ID [FailedToConnect]
-> AggregateError: [ECONNREFUSED]
## Expected behavior
Q connects successfully. It did this previously.
## System details (run `AWS: About` and/or `Amazon Q: About`)
$ uname -a
Linux horus.lycopersicum.local 6.11.4-101.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Oct 20 15:02:40 UTC 2024 x86_64 GNU/Linux
$ aws --version
aws-cli/2.18.2 Python/3.12.6 Linux/6.11.4-101.fc39.x86_64 exe/x86_64.fedora.39
$ code --version
1.94.2
384ff7382de624fb94dbaf6da11977bba1ecd427
x64
Amazon Q version 1.30.0
Contributor guide
Research direction
Reproduce the Builder ID sign-in flow from the Amazon Q icon and inspect the logs around startCodeWhispererBuilderIdSetup and the /client/register ECONNREFUSED response. Use the reported versions and AWS: About or Amazon Q: About commands as context. Done means Builder ID authentication completes successfully without the Webview error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100