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.49k stars 418 forks source link

Q Chat "while loading view: aws.AmazonQChatView" in vscode dev container #4503

Open Ethanjfobrien opened 7 months ago

Ethanjfobrien commented 7 months ago

System details (run the AWS: About Toolkit command)

OS: Linux x64 5.15.49-linuxkit Visual Studio Code extension host: 1.71.0 AWS Toolkit: 2.12.0 node: 16.14.2

using a dev env for vscode on my Macbook pro running Sonoma 14.2.1 dev env image: mcr.microsoft.com/devcontainers/javascript-node@sha256:3511cb8ff39e3b5c45a159e2e56628395b177be04ba9340dbc91919419cb11e8

Question

Code whisperer is working to generate snippets but I get this error in the Q Chat window: "An error occurred while loading view: aws.AmazonQChatView"

when I view the toolkit logs I get this: 2024-03-05 14:36:41 [INFO]: log level: info 2024-03-05 14:36:41 [INFO]: endpoints: retrieving AWS endpoints data 2024-03-05 14:36:41 [INFO]: telemetry cache not found: '/root/.vscode-server/data/User/globalStorage/amazonwebservices.aws-toolkit-vscode/telemetryCache' 2024-03-05 14:36:41 [WARN]: AwsContext: no default region in credentials profile, falling back to us-east-1: 2024-03-05 14:36:42 [INFO]: PacProxyAgent not found 2024-03-05 14:36:43 [INFO]: OS: Linux x64 5.15.49-linuxkit 2024-03-05 14:36:43 [INFO]: Visual Studio Code extension host: 1.71.0 2024-03-05 14:36:43 [INFO]: AWS Toolkit: 2.12.0 2024-03-05 14:36:43 [INFO]: node: 16.14.2 2024-03-05 14:36:44 [ERROR]: Ec2MetadataClient failed to fetch token: Error: connect ECONNREFUSED 169.254.169.254:80 [ECONNREFUSED] 2024-03-05 14:36:48 [WARN]: Received invalid message from client: isCredentialConnected 2024-03-05 14:36:54 [INFO]: selected AWS ID sign in 2024-03-05 14:40:05 [INFO]: using codewhispererService service configuration: default 2024-03-05 14:41:43 [INFO]: telemetry: sent batch (size=20) 2024-03-05 14:41:43 [INFO]: telemetry: sent batch (size=3) 2024-03-05 14:45:16 [WARN]: telemetry: invalid Metric: "codewhisperer_onboardingClick" 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-03-05 14:45:28 [WARN]: telemetry: invalid Metric: "codewhisperer_clientComponentLatency" 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-03-05 14:46:29 [WARN]: telemetry: invalid Metric: "codewhisperer_onboardingClick" 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-03-05 14:46:44 [INFO]: telemetry: sent batch (size=20) 2024-03-05 14:46:44 [WARN]: telemetry: invalid Metric: "codewhisperer_clientComponentLatency" 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-03-05 14:46:44 [INFO]: telemetry: sent batch (size=6) 2024-03-05 14:47:22 [WARN]: telemetry: invalid Metric: "codewhisperer_onboardingClick" 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-03-05 14:51:45 [INFO]: telemetry: sent batch (size=20) 2024-03-05 14:51:45 [INFO]: telemetry: sent batch (size=6) 2024-03-05 14:56:08 [ERROR]: Commands/Telemetry: "aws.codeWhisperer.openReferencePanel" executed with invalid "source" type: "[ undefined ]" 2024-03-05 14:56:46 [INFO]: telemetry: sent batch (size=14) 2024-03-05 14:56:51 [WARN]: 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

justinmk3 commented 7 months ago

Does "vscode dev env" mean a dev container?

2024-03-05 14:56:08 [ERROR]: Commands/Telemetry: "aws.codeWhisperer.openReferencePanel" executed with invalid "source" type: "[ undefined ]"

related code: https://github.com/aws/aws-toolkit-vscode/blob/62022f869d53e4165b50d4d1af7c7362b84e6c36/packages/core/src/codewhisperer/service/referenceInlineProvider.ts#L79-L84

Ethanjfobrien commented 7 months ago

Yes, correct a vscode dev container. the container image is mcr.microsoft.com/devcontainers/javascript-node:0-18

It comes as one of the standard ones when you choose to create a dev container from the IDE for node.js+javascript