aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.47k stars 408 forks source link

Sign in to get started doesn't work on Code Editor in SM Studio #5394

Open pnipinto opened 1 month ago

pnipinto commented 1 month ago

Problem

Clicking the button does nothing

Steps to reproduce the issue

  1. Install Q extension from marketplace
  2. Open a folder
  3. Select the red amazon Q in the bottom pane of code editor
  4. Click sign in to get started and see it doesn't work

Expected behavior

Takes you to sign in page for Q for Developer

System details (run AWS: About and/or Amazon Q: About)

Marketplace ID: amazonwebservices.amazon-q-vscode

awscamille commented 1 month ago

I am having the same issue on a code-server environment running on an EC2. No helpful information in the logs.

akrishna1995 commented 1 week ago

I see the same issue:

2024-09-04 15:43:52.318 [info] Log level: info
2024-09-04 15:43:52.318 [info] Telemetry product: Amazon Q For VS Code
2024-09-04 15:43:52.462 [info] Telemetry Client ID: 082f72c7-c52a-4186-be40-020b16ebf62f
2024-09-04 15:43:52.462 [info] Telemetry Session ID: cabea8e7-a8a1-5e51-a60e-07218f4a5937
2024-09-04 15:43:52.462 [info] codewhisperer: active connection changed
2024-09-04 15:43:52.462 [info] codewhisperer: connection states
    connection isValid=false,
    connection isValidCodewhispererCoreConnection=false,
    connection isExpired=false,
    secondaryAuth isExpired=false,
    connection isUndefined=true
2024-09-04 15:43:52.757 [info] Trying to register toolkit callback. Toolkit is installed, 
                        toolkit activated = false
2024-09-04 15:43:52.757 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2024-09-04 15:43:52.757 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2024-09-04 15:43:53.036 [info] initialized 'submitFeedback' command with default feedback id: Amazon Q
2024-09-04 15:43:53.267 [info] Trying to register toolkit callback. Toolkit is installed, 
                        toolkit activated = false
2024-09-04 15:43:53.267 [info] toolkitApi: Registering callbacks of toolkit api
2024-09-04 15:43:58.033 [info] LspController: LSP already installed

for some reason the gear icon is also missing in VS Code to enable debug level logging

akrishna1995 commented 1 week ago

sagemaker code editor's VS Code patch is on 1.90 just a few versions behind 1.92.2

gogakoreli commented 1 week ago

This is one of the exceptions that is happening, even though Amazon Q has been successfully authenticated this is the error when trying to trigger inline suggestion. Reference to the code where exception is thrown: https://github.com/aws/aws-toolkit-vscode/blob/faffcd09e250fb67eceaa6264c81fd31533d6976/packages/core/src/codewhisperer/service/recommendationHandler.ts#L268

Why does this happen, "Connection is not an IAM connection" where is this error message coming from?

See screenshot: image (2)