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

AWS Explorer not visible #3044

Closed palayoov closed 1 year ago

palayoov commented 1 year ago

Hello, I am hoping this is a simple user error on my end, but I have 3 different Windows machines and all have the same issue where I can only see: CodeCatalyst, CDK, and CodeWhisperer in the AWS extension. The AWS Explorer is not visible. I am able to connect to my AWS profiles fine with no issues. image

jpinkney-aws commented 1 year ago

Are you able to right click beside the AWS: DEVELOPER TOOLS text (above Connected with profile) and see if you have an explorer option? Screen Shot 2022-12-12 at 10 29 08 AM

palayoov commented 1 year ago

I tried to right click and the Explorer option is missing: image

justinmk3 commented 1 year ago

In the vscode command bar (ctrl+shift+p), if you type "aws expl", does this command appear? If so, it should enable the Explorer.

image

Can you provide the system details requested by the issue template: (run the AWS: About Toolkit command)

Can you provide the logs (check that private info is removed)?

  1. In VSCode settings, ensure that "aws log level" is "debug".
  2. Perform the steps to reproduce the issue.
  3. Remove any private info from the logs.
  4. Use the AWS: View Toolkit Logs command to get the logs.
palayoov commented 1 year ago

Please see below, thank you

About Toolkit: OS: Windows_NT x64 10.0.22000 Visual Studio Code extension host: 1.74.0 AWS Toolkit: 1.58.0 node: 16.14.2 electron: 19.1.8

2022-12-12 10:58:00 [ERROR]: log level: debug 2022-12-12 10:58:00 [DEBUG]: Logging started: file:///c%3A/Users/vinoo/AppData/Roaming/Code/logs/20221212T105756/window1/exthost/amazonwebservices.aws-toolkit-vscode/aws_toolkit_20221212T105759.log 2022-12-12 10:58:01 [INFO]: Retrieving AWS endpoint data 2022-12-12 10:58:01 [VERBOSE]: loading file resource: "c:\Users\vinoo.vscode\extensions\amazonwebservices.aws-toolkit-vscode-1.58.0\resources\endpoints.json" 2022-12-12 10:58:01 [INFO]: OS: Windows_NT x64 10.0.22000 2022-12-12 10:58:01 [INFO]: Visual Studio Code extension host: 1.74.0 2022-12-12 10:58:01 [INFO]: AWS Toolkit: 1.58.0 2022-12-12 10:58:01 [INFO]: node: 16.14.2 2022-12-12 10:58:01 [INFO]: electron: 19.1.8 2022-12-12 10:58:01 [VERBOSE]: Telemetry is now enabled 2022-12-12 10:58:01 [WARN]: AwsContext: no default region in credentials profile, falling back to us-east-1: 2022-12-12 10:58:01 [DEBUG]: telemetry: emitted metric "session_start" 2022-12-12 10:58:01 [VERBOSE]: downloading: https://api.github.com/repos/awslabs/goformation/releases/latest 2022-12-12 10:58:01 [WARN]: CloudFormationTemplateRegistry: addWatchPattern(/*.{yaml,yml}): no workspace 2022-12-12 10:58:02 [DEBUG]: telemetry: emitted metric "vscode_activeRegions" 2022-12-12 10:58:02 [VERBOSE]: Refreshing AWS Explorer due to Region Provider updates 2022-12-12 10:58:02 [WARN]: CodelensRootRegistry: addWatchPattern(/requirements.txt): no workspace 2022-12-12 10:58:02 [VERBOSE]: downloaded: https://api.github.com/repos/awslabs/goformation/releases/latest 2022-12-12 10:58:02 [VERBOSE]: downloading: https://api.github.com/repos/devfile/api/releases/latest 2022-12-12 10:58:02 [WARN]: CodelensRootRegistry: addWatchPattern(/package.json): no workspace 2022-12-12 10:58:02 [WARN]: CodelensRootRegistry: addWatchPattern(*/.csproj): no workspace 2022-12-12 10:58:02 [WARN]: CodelensRootRegistry: addWatchPattern(/go.mod): no workspace 2022-12-12 10:58:02 [WARN]: CodelensRootRegistry: addWatchPattern(/build.gradle): no workspace 2022-12-12 10:58:02 [WARN]: CodelensRootRegistry: addWatchPattern(/pom.xml): no workspace 2022-12-12 10:58:02 [VERBOSE]: downloaded: https://api.github.com/repos/devfile/api/releases/latest 2022-12-12 10:58:02 [VERBOSE]: loading file resource: "c:\Users\vinoo\AppData\Roaming\Code\User\globalStorage\amazonwebservices.aws-toolkit-vscode\cloudformation.schema.json" 2022-12-12 10:58:02 [VERBOSE]: loading file resource: "c:\Users\vinoo\AppData\Roaming\Code\User\globalStorage\amazonwebservices.aws-toolkit-vscode\sam.schema.json" 2022-12-12 10:58:02 [VERBOSE]: loading file resource: "c:\Users\vinoo\AppData\Roaming\Code\User\globalStorage\amazonwebservices.aws-toolkit-vscode\devfile.schema.json" 2022-12-12 10:58:02 [DEBUG]: telemetry: emitted metric "toolkit_init" 2022-12-12 10:58:02 [VERBOSE]: Loading all Shared Credentials Profiles 2022-12-12 10:58:02 [VERBOSE]: credentials: found profiles: 2022-12-12 10:58:02 [VERBOSE]: Profile vinoo contains aws_access_key_id - treating as regular Shared Credentials 2022-12-12 10:58:03 [DEBUG]: command: running "aws.codeWhisperer.refresh" 2022-12-12 10:58:03 [DEBUG]: command: running "aws.codeWhisperer.refreshRootNode" 2022-12-12 10:58:03 [DEBUG]: command: running "aws.codeWhisperer.refreshStatusBar" 2022-12-12 10:58:03 [DEBUG]: command: running "aws.codeWhisperer.updateReferenceLog" 2022-12-12 10:58:03 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 10:58:03 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 10:58:03 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 10:58:03 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 10:58:03 [DEBUG]: command: running "aws.codeWhisperer.refreshRootNode" 2022-12-12 10:58:03 [DEBUG]: commands: skipped telemetry for "aws.codeWhisperer.refreshRootNode" 2022-12-12 10:58:03 [VERBOSE]: Credentials changed (profile:vinoo), updating AWS Explorer 2022-12-12 10:58:03 [DEBUG]: telemetry: emitted metric "aws_validateCredentials" 2022-12-12 10:58:06 [WARN]: auth (codecatalyst): removing saved connection "codecatalyst.savedConnectionId" as it no longer exists 2022-12-12 10:58:06 [WARN]: auth (codewhisperer): removing saved connection "codewhisperer.savedConnectionId" as it no longer exists 2022-12-12 10:58:06 [DEBUG]: command: running "aws.codeWhisperer.refresh" 2022-12-12 10:58:06 [DEBUG]: command: running "aws.codeWhisperer.refreshRootNode" 2022-12-12 10:58:06 [DEBUG]: command: running "aws.codeWhisperer.refreshStatusBar" 2022-12-12 10:58:06 [DEBUG]: command: running "aws.codeWhisperer.updateReferenceLog" 2022-12-12 10:58:06 [DEBUG]: commands: skipped telemetry for "aws.codeWhisperer.refresh" 2022-12-12 10:58:06 [DEBUG]: commands: skipped telemetry for "aws.codeWhisperer.refreshRootNode" 2022-12-12 10:58:06 [DEBUG]: commands: skipped telemetry for "aws.codeWhisperer.refreshStatusBar" 2022-12-12 10:58:06 [DEBUG]: commands: skipped telemetry for "aws.codeWhisperer.updateReferenceLog" 2022-12-12 10:58:22 [DEBUG]: command: running "aws.auth.switchConnections" with arguments [[object Object], undefined] 2022-12-12 10:58:22 [DEBUG]: telemetry: emitted metric "ui_click" 2022-12-12 10:58:22 [VERBOSE]: icons: using override for "vscode-help" 2022-12-12 10:58:22 [VERBOSE]: credentials: EC2 metadata service unavailable: Error: connect ENETUNREACH 169.254.169.254:80 2022-12-12 10:58:22 [VERBOSE]: credentials: EC2 metadata service call took 26ms 2022-12-12 10:58:22 [VERBOSE]: provider for instance unavailable in this environment 2022-12-12 10:58:22 [VERBOSE]: provider for instance unavailable in this environment 2022-12-12 10:58:22 [VERBOSE]: provider for variables unavailable in this environment 2022-12-12 10:58:22 [DEBUG]: telemetry: emitted metric "aws_loadCredentials" 2022-12-12 10:58:35 [DEBUG]: command: running "aws.auth.addConnection" with arguments [[object Object], undefined] 2022-12-12 10:58:35 [DEBUG]: telemetry: emitted metric "aws_setCredentials" 2022-12-12 10:58:35 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 10:58:35 [VERBOSE]: aws.auth.switchConnections: user cancelled 2022-12-12 11:03:02 [INFO]: telemetry: sent batch (size=13) 2022-12-12 18:26:41 [DEBUG]: telemetry: emitted metric "ui_click" 2022-12-12 18:26:41 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:26:41 [VERBOSE]: aws.auth.addConnection: user cancelled 2022-12-12 18:27:21 [DEBUG]: command: running "aws.aboutToolkit" 2022-12-12 18:28:03 [INFO]: telemetry: sent batch (size=2) 2022-12-12 18:28:07 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:29:38 [DEBUG]: command: running "aws.viewLogs" 2022-12-12 18:29:38 [DEBUG]: telemetry: emitted metric "toolkit_viewLogs" 2022-12-12 18:29:38 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:29:59 [DEBUG]: command: running "aws.auth.switchConnections" with arguments [[object Object]] 2022-12-12 18:29:59 [DEBUG]: telemetry: emitted metric "ui_click" 2022-12-12 18:29:59 [VERBOSE]: provider for instance unavailable in this environment 2022-12-12 18:29:59 [VERBOSE]: provider for instance unavailable in this environment 2022-12-12 18:29:59 [VERBOSE]: provider for variables unavailable in this environment 2022-12-12 18:29:59 [DEBUG]: telemetry: emitted metric "aws_loadCredentials" 2022-12-12 18:30:05 [VERBOSE]: Profile vinoo-train contains aws_access_key_id - treating as regular Shared Credentials 2022-12-12 18:30:06 [VERBOSE]: Credentials changed (undefined), updating AWS Explorer 2022-12-12 18:30:06 [DEBUG]: command: running "aws.codeWhisperer.refresh" 2022-12-12 18:30:06 [DEBUG]: command: running "aws.codeWhisperer.refreshRootNode" 2022-12-12 18:30:06 [DEBUG]: command: running "aws.codeWhisperer.refreshStatusBar" 2022-12-12 18:30:06 [DEBUG]: command: running "aws.codeWhisperer.updateReferenceLog" 2022-12-12 18:30:06 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:30:06 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:30:06 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:30:06 [DEBUG]: telemetry: emitted metric "vscode_executeCommand" 2022-12-12 18:30:06 [DEBUG]: telemetry: emitted metric "aws_setCredentials" 2022-12-12 18:30:06 [DEBUG]: telemetry: emitted metric "vscode_executeCommand"

justinmk3 commented 1 year ago

In the vscode command bar (ctrl+shift+p), if you type "aws expl", does this command appear? If so, it should enable the Explorer.

image
justinmk3 commented 1 year ago

Please also try:

  1. Run the command Preferences: Open User Settings (JSON).
  2. Move that file somewhere else on your system, so that vscode settings are "clear".
  3. Restart vscode.
palayoov commented 1 year ago

aws explorer does not show up as a command... image

I also moved the user settings json as suggested and restarted. Same results.

justinmk3 commented 1 year ago

I wonder if these messages are a hint about where Toolkit logic may be failing:

2022-12-12 10:58:01 [WARN]: AwsContext: no default region in credentials profile, falling back to us-east-1:
...
2022-12-12 10:58:02 [VERBOSE]: Refreshing AWS Explorer due to Region Provider updates

We will need to look closely at the logic here to see if this issue can be reproduced.

As a workaround, try adding this line in your profile(s) in ~/.aws/credentials and/or ~/.aws/config (replace "us-west-2" with whatever region you normally use):

region=us-west-2
palayoov commented 1 year ago

I finally resolved this by uninstalling VS Code, deleting the C:\users\<user>\.vscode folder and reinstalling