aws-toolkit-vscode icon indicating copy to clipboard operation
aws-toolkit-vscode copied to clipboard

Raspberry Pi + vscode.dev

Open pugpapa opened this issue 1 year ago • 1 comments

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

  • OS: PiOS
  • Visual Studio Code version: 1.93.1
  • AWS Toolkit version:
  • Amazon Q version: 1.28

Question

I'm on a Raspberry Pi5 and wanting to use Amazon Q on vscode.dev to develop over the remote tunnel. Is this possible? I am able use it when I'm on the Raspberry Pi itself, but not remotely.

pugpapa avatar Oct 09 '24 02:10 pugpapa

Not yet, but subscribe to https://github.com/aws/aws-toolkit-vscode/issues/2205 for future updates.

justinmk3 avatar Oct 11 '24 20:10 justinmk3

https://github.com/aws/aws-toolkit-vscode/pull/5847 may fix the "remote tunnel" case.

justinmk3 avatar Oct 24 '24 20:10 justinmk3

This may have been fixed in Amazon Q 1.31.0, can you verify?

hayemaxi avatar Oct 29 '24 13:10 hayemaxi

It is not. I am on 1.32 and when I click on the red box to sign in with my Builder ID, nothing happens. Is there an alternate way to authenticate?

pugpapa avatar Oct 30 '24 04:10 pugpapa

Can you provide the Amazon Q logs?

  1. In the vscode command palette, run Amazon Q: View Logs. This reveals the Output panel with Amazon Q Logs selected.
  2. Click the gear icon and choose Debug, then click it again and choose Set As Default.
  3. Perform the steps to reproduce the issue.
  4. Remove any private info from the logs.

Also need details on what is meant by "over the remote tunnel" specifically. Because there are many ways in vscode to use it remotely. Please say the exact steps you use to connect to vscode remote tunnel.

A screenshot (with private info removed) may help.

justinmk3 avatar Oct 30 '24 22:10 justinmk3

2024-11-02 15:59:02.301 [debug] telemetry: collapsing 1 "aws.amazonq.listCommands" metrics. key={}
2024-11-02 15:59:02.301 [debug] command: running "aws.amazonq.listCommands" with arguments: []
2024-11-02 15:59:02.301 [debug] telemetry: ui_click
2024-11-02 15:59:02.301 [debug] telemetry: collapsing 1 "aws.amazonq.refreshAnnotation" metrics. key={}
2024-11-02 15:59:02.301 [debug] command: running "aws.amazonq.refreshAnnotation" with arguments: [ true ]
2024-11-02 15:59:07.057 [debug] telemetry: collapsing 1 "aws.amazonq.focusChat" metrics. key={ '1': 'source' }
2024-11-02 15:59:07.057 [debug] command: running "aws.amazonq.focusChat" with arguments: [ 'placeholder**', 'codewhispererQuickPick' ]
2024-11-02 15:59:07.128 [debug] telemetry: auth_signInPageOpened
2024-11-02 15:59:07.128 [debug] telemetry: amazonq_openChat

But nothing happens

In case a process tree is helpful:


   1179    1204    1204    1204 ?             -1 SLsl  1000   1:12  \_ /usr/share/code/bin/code-tunnel --verbose --cli-data-dir /home/pugpapa/.vscode/cli tunnel service internal
   1204  327256    1204    1204 ?             -1 S     1000   0:00  |   \_ sh /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/bin/code-s
 327256  327260    1204    1204 ?             -1 Sl    1000   0:10  |       \_ /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/node /hom
 327260  327302    1204    1204 ?             -1 Sl    1000   0:00  |           \_ /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/node 
 327302  327421  327421  327421 pts/1     327421 Ss+   1000   0:00  |           |   \_ /bin/bash --init-file /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11
 327260  327350    1204    1204 ?             -1 Sl    1000   0:00  |           \_ /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/node 
 327260  327518    1204    1204 ?             -1 Sl    1000   0:26  |           \_ /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/node 
 327518  327683    1204    1204 ?             -1 Sl    1000   0:01  |           |   \_ Amazon Q Helper (Workspace Context)
 327518  328580    1204    1204 ?             -1 Sl    1000   0:00  |           |   \_ /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/n
 327260  327549    1204    1204 ?             -1 Sl    1000   0:00  |           \_ /home/pugpapa/.vscode/cli/servers/Stable-65edc4939843c90c34d61f4ce11704f09d3e5cb6/server/node 

I've started up the server on my Pi, and using vscode.dev (connected to my GitHub) to tunnel in.

Not sure what happens on their side, but these are the docs: https://code.visualstudio.com/docs/remote/tunnels

pugpapa avatar Nov 02 '24 23:11 pugpapa

when I click on the red box to sign in with my Builder ID, nothing happens

Try clicking it again. There is a known usability issue where if an item in the login menu is expired, it may require multiple clicks.

If that doesn't work, try clicking the Q logo in the vscode sidebar, it should show a login form like this:

image

If you don't see the Q logo in the sidebar, right-click on the sidebar to enable it:

image

justinmk3 avatar Nov 04 '24 15:11 justinmk3

Nothing shows up in the Q box Screenshot 2024-11-06 at 21 05 06

pugpapa avatar Nov 07 '24 05:11 pugpapa

Possibly vscode's own logs might give a hint, if you can provide those. If vscode is not showing the extension webview, that's very unusual. Does that happen with any other extensions that use webviews, on that same system?

justinmk3 avatar Nov 07 '24 17:11 justinmk3

I took a screen recording, take a look here: https://1drv.ms/v/s!Amsb28k2KHrZg7NTCWnPT_oaa4JjYQ?e=DmCFHE

pugpapa avatar Nov 09 '24 22:11 pugpapa

Just for troubleshooting, can you try also installing AWS Toolkit (on the same system where Amazon Q is showing a blank view)? I'm wondering if Amazon Q has a bug related to its (optional) dependency on AWS Toolkit.

justinmk3 avatar Nov 11 '24 13:11 justinmk3

Q and toolkit are installed now. No signin screen in either. Here are the logs:

2024-11-11 09:25:36.438 [info] Log level: info
2024-11-11 09:25:36.438 [info] Telemetry product: Amazon Q For VS Code
2024-11-11 09:25:36.597 [info] Telemetry clientId: 051ddced-421c-4510-8b25-8cb062f906d1
2024-11-11 09:25:36.598 [info] Telemetry sessionId: 866ce2bc-2c29-490a-8091-43782997ed3d
2024-11-11 09:25:36.598 [info] codewhisperer: active connection changed
2024-11-11 09:25:36.598 [info] codewhisperer: connection states
    connection isValid=false,
    connection isValidCodewhispererCoreConnection=false,
    connection isExpired=false,
    secondaryAuth isExpired=false,
    connection isUndefined=true
2024-11-11 09:25:36.807 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2024-11-11 09:25:36.807 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2024-11-11 09:25:38.266 [info] initialized 'submitFeedback' command with default feedback id: Amazon Q
2024-11-11 09:25:43.406 [info] LspController: LSP already installed
2024-11-11 09:25:44.334 [info] LspController: LSP activated
2024-11-11 09:25:44.334 [info] LspController: Starting to build index of project
2024-11-11 09:26:07.070 [info] Trying to register toolkit callback. Toolkit is installed, 
                        toolkit activated = false
2024-11-11 09:26:07.070 [info] toolkitApi: Registering callbacks of toolkit api
2024-11-11 09:27:13.984 [debug] telemetry: auth_signInPageClosed
2024-11-11 09:27:13.984 [debug] telemetry: auth_addConnection
2024-11-11 09:27:13.984 [debug] telemetry: amazonq_closeChat
2024-11-11 09:27:20.723 [debug] telemetry: auth_signInPageOpened
2024-11-11 09:27:20.723 [debug] telemetry: amazonq_openChat
2024-11-11 09:26:04.202 [info] Log level: info
2024-11-11 09:26:04.202 [info] endpoints: retrieving AWS endpoints data
2024-11-11 09:26:04.202 [info] Telemetry product: AWS Toolkit For VS Code
2024-11-11 09:26:04.282 [info] Telemetry clientId: 051ddced-421c-4510-8b25-8cb062f906d1
2024-11-11 09:26:04.282 [info] Telemetry sessionId: 866ce2bc-2c29-490a-8091-43782997ed3d
2024-11-11 09:26:05.533 [info] OS: Linux arm64 6.6.51+rpt-rpi-2712
2024-11-11 09:26:05.533 [info] Visual Studio Code extension host:  1.95.2
2024-11-11 09:26:05.533 [info] AWS Toolkit:  3.32.0
2024-11-11 09:26:05.533 [info] node: 20.18.0
2024-11-11 09:26:05.564 [info] initialized 'submitFeedback' command with default feedback id: AWS Toolkit
2024-11-11 09:26:06.225 [warning] Ec2MetadataClient failed to fetch token. If this is an EC2 environment, then Toolkit will fall back to IMDSv1: TimeoutError: Socket timed out without establishing a connection ()
2024-11-11 09:26:42.987 [debug] telemetry: auth_signInPageClosed
2024-11-11 09:26:42.987 [debug] telemetry: auth_addConnection
2024-11-11 09:26:47.441 [debug] telemetry: auth_signInPageOpened
2024-11-11 09:26:52.097 [debug] telemetry: auth_signInPageClosed
2024-11-11 09:26:52.097 [debug] telemetry: auth_addConnection
2024-11-11 09:26:55.649 [debug] telemetry: auth_signInPageOpened
2024-11-11 09:27:00.990 [debug] telemetry: auth_signInPageClosed
2024-11-11 09:27:00.990 [debug] telemetry: auth_addConnection
2024-11-11 09:27:19.201 [debug] telemetry: auth_signInPageOpened
2024-11-11 09:27:20.723 [debug] telemetry: auth_signInPageClosed
2024-11-11 09:27:20.723 [debug] telemetry: auth_addConnection
2024-11-11 09:28:39.447 [debug] telemetry: auth_signInPageOpened

pugpapa avatar Nov 11 '24 17:11 pugpapa

I'm going through the same situation.

2024-11-12 18:52:37.152 [info] Log level: info
2024-11-12 18:52:37.152 [info] Telemetry product: Amazon Q For VS Code
2024-11-12 18:52:37.164 [info] Telemetry clientId: e4bbf1a9-0087-42a8-a016-9b734c7579b4
2024-11-12 18:52:37.164 [info] Telemetry sessionId: 31880669-1c86-495e-8962-4fb6196fad02
2024-11-12 18:52:37.164 [info] codewhisperer: active connection changed
2024-11-12 18:52:37.164 [info] codewhisperer: connection states
    connection isValid=false,
    connection isValidCodewhispererCoreConnection=false,
    connection isExpired=false,
    secondaryAuth isExpired=false,
    connection isUndefined=true
2024-11-12 18:52:37.169 [info] Trying to register toolkit callback. Toolkit is installed, 
                        toolkit activated = true
2024-11-12 18:52:37.169 [info] toolkitApi: Registering callbacks of toolkit api
2024-11-12 18:52:37.170 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2024-11-12 18:52:37.170 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2024-11-12 18:52:37.193 [info] initialized 'submitFeedback' command with default feedback id: Amazon Q
2024-11-12 18:52:37.907 [warning] endpoints: failed to load from remote source, region data may appear outdated: Error: Failed to get resource
2024-11-12 18:52:59.633 [debug] telemetry: collapsing 1 "aws.amazonq.listCommands" metrics. key={}
2024-11-12 18:52:59.633 [debug] command: running "aws.amazonq.listCommands" with arguments: []
2024-11-12 18:52:59.633 [debug] telemetry: ui_click
2024-11-12 18:52:59.633 [debug] telemetry: collapsing 1 "aws.amazonq.refreshAnnotation" metrics. key={}
2024-11-12 18:52:59.633 [debug] command: running "aws.amazonq.refreshAnnotation" with arguments: [ true ]
2024-11-12 18:53:02.526 [debug] telemetry: collapsing 1 "aws.amazonq.focusChat" metrics. key={ '1': 'source' }
2024-11-12 18:53:02.526 [debug] command: running "aws.amazonq.focusChat" with arguments: [ 'placeholder**', 'codewhispererQuickPick' ]
2024-11-12 18:53:07.977 [info] LspController: LSP activated
2024-11-12 18:53:07.977 [info] LspController: Starting to build index of project
2024-11-12 18:53:09.684 [info] LspController: Found 5301 files in current project ...
2024-11-12 18:53:10.939 [debug] LspController: Finish building index of project
2024-11-12 18:53:10.977 [debug] telemetry: amazonq_indexWorkspace
2024-11-12 18:53:15.589 [debug] telemetry: auth_signInPageClosed
2024-11-12 18:53:15.590 [debug] telemetry: auth_addConnection
2024-11-12 18:53:15.590 [debug] telemetry: amazonq_closeChat
2024-11-12 18:53:16.392 [debug] telemetry: auth_signInPageOpened
2024-11-12 18:53:16.392 [debug] telemetry: amazonq_openChat
2024-11-12 18:53:16.855 [debug] telemetry: auth_signInPageClosed
2024-11-12 18:53:16.855 [debug] telemetry: auth_addConnection
2024-11-12 18:53:16.855 [debug] telemetry: amazonq_closeChat
2024-11-12 18:53:17.640 [debug] telemetry: auth_signInPageOpened
2024-11-12 18:53:17.640 [debug] telemetry: amazonq_openChat
2024-11-12 18:56:19.912 [debug] telemetry: collapsing 2 "aws.amazonq.listCommands" metrics. key={}
2024-11-12 18:56:19.912 [debug] command: running "aws.amazonq.listCommands" with arguments: []
2024-11-12 18:56:19.912 [debug] telemetry: ui_click
2024-11-12 18:56:19.912 [debug] telemetry: collapsing 2 "aws.amazonq.refreshAnnotation" metrics. key={}
2024-11-12 18:56:19.912 [debug] command: running "aws.amazonq.refreshAnnotation" with arguments: [ true ]
2024-11-12 18:56:21.041 [debug] telemetry: collapsing 2 "aws.amazonq.focusChat" metrics. key={ '1': 'source' }
2024-11-12 18:56:21.041 [debug] command: running "aws.amazonq.focusChat" with arguments: [ 'placeholder**', 'codewhispererQuickPick' ]

I also tried installing the AWS Toolkit, but no screen appears. The aws toolkit log is as follows.

2024-11-12 18:46:34.615 [info] Log level: info
2024-11-12 18:46:34.630 [info] endpoints: retrieving AWS endpoints data
2024-11-12 18:46:34.630 [info] Telemetry product: AWS Toolkit For VS Code
2024-11-12 18:46:34.633 [info] Telemetry clientId: e4bbf1a9-0087-42a8-a016-9b734c7579b4
2024-11-12 18:46:34.633 [info] Telemetry sessionId: 31880669-1c86-495e-8962-4fb6196fad02
2024-11-12 18:46:34.667 [info] OS: Darwin arm64 23.6.0
2024-11-12 18:46:34.667 [info] Visual Studio Code extension host:  1.95.2
2024-11-12 18:46:34.667 [info] AWS Toolkit:  3.32.0
2024-11-12 18:46:34.667 [info] node: 20.18.0
2024-11-12 18:46:34.667 [info] electron: 32.2.1
2024-11-12 18:46:34.668 [info] initialized 'submitFeedback' command with default feedback id: AWS Toolkit
2024-11-12 18:46:34.736 [warning] Ec2MetadataClient failed to fetch token. If this is an EC2 environment, then Toolkit will fall back to IMDSv1: Error:
2024-11-12 18:46:34.812 [warning] command failed (not registered?): "aws.amazonq.refreshConnectionCallback"
2024-11-12 18:46:35.375 [warning] endpoints: failed to load from remote source, region data may appear outdated: Error: Failed to get resource
2024-11-12 18:47:10.223 [debug] telemetry: collapsing 1 "aws.toolkit.login" metrics. key={}
2024-11-12 18:47:10.224 [debug] command: running "aws.toolkit.login" with arguments: []
2024-11-12 18:47:10.224 [debug] auth: "instance" provider unavailable
2024-11-12 18:47:10.224 [debug] auth: "instance" provider unavailable
2024-11-12 18:47:10.224 [debug] auth: "variables" provider unavailable
2024-11-12 18:47:10.233 [debug] telemetry: aws_loadCredentials
2024-11-12 18:47:10.233 [debug] telemetry: collapsing 1 "aws.toolkit.auth.manageConnections" metrics. key={ '1': 'source' }
2024-11-12 18:47:10.233 [debug] command: running "aws.toolkit.auth.manageConnections" with arguments: [ 'placeholder**', 'vscodeComponent' ]
2024-11-12 18:47:41.979 [debug] telemetry: auth_signInPageClosed
2024-11-12 18:47:41.979 [debug] telemetry: auth_addConnection
2024-11-12 18:47:44.997 [debug] telemetry: auth_signInPageOpened
2024-11-12 18:47:45.503 [debug] telemetry: auth_signInPageClosed
2024-11-12 18:47:45.504 [debug] telemetry: auth_addConnection
2024-11-12 18:47:46.562 [debug] telemetry: auth_signInPageOpened
2024-11-12 18:47:55.052 [debug] telemetry: collapsing 2 "aws.toolkit.login" metrics. key={}
2024-11-12 18:47:55.052 [debug] command: running "aws.toolkit.login" with arguments: []

I deleted all other plugins. What's causing the problem? When can it be resolved?

thx.

suminhong avatar Nov 12 '24 09:11 suminhong

2024-11-12 18:52:37.907 [warning] endpoints: failed to load from remote source, region data may appear outdated: Error: Failed to get resource

@suminhong This suggests that http requests are failing. Can you confirm that vscode extensions can successfully make network requests? Are you behind a proxy? Please open a new issue (unless you are also using raspberry pi + vscode.dev).

justinmk3 avatar Nov 12 '24 14:11 justinmk3

@justinmk3 Oh right. Some outbound services may be blocked due to my company's internal security policy. So can you tell me which domain this should be able to reach? I have to ask security team to open it.

suminhong avatar Nov 12 '24 23:11 suminhong

which domain this should be able to reach?

Documented here:

  • https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/endpoints.html
  • Amazon Q endpoints: https://docs.aws.amazon.com/general/latest/gr/amazonq.html
  • https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/vpc-interface-endpoints.html
    • com.amazonaws.<region>.q
    • com.amazonaws.<region>.codewhisperer

justinmk3 avatar Nov 13 '24 02:11 justinmk3

@justinmk3 Hi, I found this out while researching with the security team. To receive the login form, must be able to access the cdnjs.cloudflare.com domain. I hope this helps you write the document.

suminhong avatar Nov 18 '24 23:11 suminhong

@justinmk3 Hi, I found this out while researching with the security team. To receive the login form, must be able to access the cdnjs.cloudflare.com domain. I hope this helps you write the document.

Confirmed that one of cases that successfully resolved by adding cdnjs.cloudflare.com. Thank you for sharing.

byoungsoo avatar Jan 16 '25 07:01 byoungsoo