Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't start client Amazon Q Language Server: "sessionOptions.intraOpNumThreads must be a number" #5926

Closed
Dragon1573 opened this issue Nov 5, 2024 · 9 comments
Labels
amazon-q bug We can reproduce the issue and confirmed it is a bug. codewhisperer network partner-team Triggers issue routing to owner team

Comments

@Dragon1573
Copy link

Problem

Steps to reproduce the issue

  1. Install "Amazon Q" plugin in your VSCode instance.
  2. Make sure you have logged in the extension once and keep yourself already logged in.
  3. Restart VSCode instance and waiting for "Amazon Q" active automatically.
  4. Two errors and an information pops up at the bottom right.

image

Expected behavior

There should be no notifications from this plugin.

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

  • OS: Windows_NT x64 10.0.22631
  • Visual Studio Code extension host: 1.95.1
  • Amazon Q: 1.33.0
  • node: 20.18.0
  • electron: 32.2.1

Note

I'm behind a proxy provided by Clash for Windows locally. Windows system-level proxy is configured as http://localhost:57890/.

@Dragon1573 Dragon1573 added the bug We can reproduce the issue and confirmed it is a bug. label Nov 5, 2024
@justinmk3
Copy link
Contributor

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.

@Dragon1573
Copy link
Author

Logs are as follows. Private information (seems UUID or something like that) are replaced with *****MASKED*****.

2024-11-06 20:26:14.005 [info] Log level: debug
2024-11-06 20:26:14.005 [debug] getClientId: determined clientId as: *****MASKED*****, process.env clientId was: undefined, stored clientId was: *****MASKED*****
2024-11-06 20:26:14.005 [debug] getClientId: setting clientId in process.env to: *****MASKED*****
2024-11-06 20:26:14.005 [debug] User agent: AmazonQ-For-VSCode/1.33.0 Visual-Studio-Code/1.95.1 ClientId/*****MASKED*****
2024-11-06 20:26:14.005 [info] Telemetry product: Amazon Q For VS Code
2024-11-06 20:26:14.005 [debug] Telemetry is enabled
2024-11-06 20:26:14.005 [debug] telemetry cache not found, skipping
2024-11-06 20:26:14.005 [debug] telemetry: session_start
2024-11-06 20:26:14.005 [info] Telemetry clientId: *****MASKED*****
2024-11-06 20:26:14.005 [info] Telemetry sessionId: *****MASKED*****
2024-11-06 20:26:14.005 [debug] firstStartup: This is not the users first use of the extension. Skipped showing Add Connections page.
2024-11-06 20:26:14.005 [debug] skipping: Settings migration ("aws.codeWhisperer.includeSuggestionsWithCodeReferences" -> "amazonQ.showInlineCodeSuggestionsWithCodeReferences"), (scope: workspaceValue), the old setting is not defined for this scope.
2024-11-06 20:26:14.005 [debug] skipping: Settings migration ("aws.codeWhisperer.includeSuggestionsWithCodeReferences" -> "amazonQ.showInlineCodeSuggestionsWithCodeReferences"), (scope: globalValue), the old setting is not defined for this scope.
2024-11-06 20:26:14.005 [debug] skipping: Settings migration ("aws.codeWhisperer.importRecommendation" -> "amazonQ.importRecommendationForInlineCodeSuggestions"), (scope: workspaceValue), the old setting is not defined for this scope.
2024-11-06 20:26:14.005 [debug] skipping: Settings migration ("aws.codeWhisperer.importRecommendation" -> "amazonQ.importRecommendationForInlineCodeSuggestions"), (scope: globalValue), the old setting is not defined for this scope.
2024-11-06 20:26:14.005 [debug] skipping: Settings migration ("aws.codeWhisperer.shareCodeWhispererContentWithAWS" -> "amazonQ.shareContentWithAWS"), (scope: workspaceValue), the old setting is not defined for this scope.
2024-11-06 20:26:14.005 [debug] skipping: Settings migration ("aws.codeWhisperer.shareCodeWhispererContentWithAWS" -> "amazonQ.shareContentWithAWS"), (scope: globalValue), the old setting is not defined for this scope.
2024-11-06 20:26:14.005 [debug] codewhisperer: new user login, activating inline tutorial. (autotriggerEnabled=undefined; inlineState=undefined)
2024-11-06 20:26:14.036 [debug] SSO token cache: loaded key: *****MASKED*****
2024-11-06 20:26:14.036 [info] current client registration id=*****MASKED*****
    expires at Fri Jan 24 2025 17:04:21 GMT+0800 (中国标准时间)
    key = *****MASKED*****
2024-11-06 20:26:14.036 [info] auth: Connection is valid: *****MASKED*****
2024-11-06 20:26:14.036 [info] auth: Updating connection state of *****MASKED***** to valid
2024-11-06 20:26:14.036 [debug] telemetry: auth_modifyConnection
2024-11-06 20:26:14.036 [info] codewhisperer: active connection changed
2024-11-06 20:26:14.036 [info] secondaryAuth: connectionId=*****MASKED*****, connectionStatus=valid
2024-11-06 20:26:14.036 [info] codewhisperer: connection states
    connection isValid=true,
    connection isValidCodewhispererCoreConnection=true,
    connection isExpired=false,
    secondaryAuth isExpired=false,
    connection isUndefined=false
2024-11-06 20:26:14.370 [info] auth: Connection is valid: *****MASKED*****
2024-11-06 20:26:14.370 [info] auth: Updating connection state of *****MASKED***** to valid
2024-11-06 20:26:14.370 [info] codewhisperer: active connection changed
2024-11-06 20:26:14.373 [debug] auth: SSO registration cache: loaded key: {"startUrl":"https://view.awsapps.com/start","region":"us-east-1","scopes":["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations","codewhisperer:transformations","codewhisperer:taskassist"]}
2024-11-06 20:26:14.373 [debug] telemetry: auth_modifyConnection
2024-11-06 20:26:14.376 [debug] amazonq: Fetching feature configs
2024-11-06 20:26:14.376 [debug] amazonq: Fetching feature configs
2024-11-06 20:26:14.376 [debug] command: running "aws.amazonq.refreshConnectionCallback" with arguments: []
2024-11-06 20:26:14.376 [debug] telemetry: vscode_executeCommand
2024-11-06 20:26:14.381 [info] using codewhispererService service configuration: default
2024-11-06 20:26:14.389 [info] auth: Connection is valid: *****MASKED*****
2024-11-06 20:26:14.389 [info] auth: Updating connection state of *****MASKED***** to valid
2024-11-06 20:26:14.391 [debug] auth: SSO registration cache: loaded key: {"startUrl":"https://view.awsapps.com/start","region":"us-east-1","scopes":["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations","codewhisperer:transformations","codewhisperer:taskassist"]}
2024-11-06 20:26:14.391 [debug] telemetry: auth_userState
2024-11-06 20:26:14.427 [debug] CWCTelemetryHelper: Initialized new telemetry helper
2024-11-06 20:26:14.427 [info] initialized 'submitFeedback' command with default feedback id: Amazon Q
2024-11-06 20:26:14.429 [debug] command: running "aws.amazonq.viewLogs" with arguments: []
2024-11-06 20:26:14.429 [debug] telemetry: vscode_executeCommand
2024-11-06 20:26:14.430 [debug] telemetry: ide_heartbeat
2024-11-06 20:26:15.357 [debug] telemetry: aws_featureConfig
2024-11-06 20:26:15.357 [debug] telemetry: aws_featureConfig
2024-11-06 20:26:15.357 [debug] telemetry: aws_featureConfig
2024-11-06 20:26:15.357 [info] AB Testing Cohort Assignments [{"feature":"ProjectContextV2","variation":"CONTROL","value":{"stringValue":"CONTROL"}},{"feature":"ViewDiffInChat","variation":"DEFAULT","value":{"stringValue":"DEFAULT"}},{"feature":"NewAutoTriggerUX","variation":"DEFAULT","value":{"stringValue":"DEFAULT"}}]
2024-11-06 20:26:15.357 [debug] CodeWhisperer: Current feature configs: {ProjectContextV2: CONTROL, ViewDiffInChat: DEFAULT, NewAutoTriggerUX: DEFAULT}
2024-11-06 20:26:15.359 [debug] telemetry: aws_featureConfig
2024-11-06 20:26:15.359 [debug] telemetry: aws_featureConfig
2024-11-06 20:26:15.359 [debug] telemetry: aws_featureConfig
2024-11-06 20:26:15.359 [info] AB Testing Cohort Assignments [{"feature":"ProjectContextV2","variation":"CONTROL","value":{"stringValue":"CONTROL"}},{"feature":"ViewDiffInChat","variation":"DEFAULT","value":{"stringValue":"DEFAULT"}},{"feature":"NewAutoTriggerUX","variation":"DEFAULT","value":{"stringValue":"DEFAULT"}}]
2024-11-06 20:26:15.359 [debug] CodeWhisperer: Current feature configs: {ProjectContextV2: CONTROL, ViewDiffInChat: DEFAULT, NewAutoTriggerUX: DEFAULT}
2024-11-06 20:26:19.437 [info] LspController: LSP already installed
2024-11-06 20:26:20.071 [error] LspController: LSP failed to activate Error: Request initialize failed with message: Invalid argument: sessionOptions.intraOpNumThreads must be a number.

@ldgmaia
Copy link

ldgmaia commented Jan 8, 2025

I am also receiving this error, but the extension works fine. It's annoying that whenever I open VS Code, I get the error in the Output tab.

@justinmk3
Copy link
Contributor

LSP failed to activate Error: Request initialize failed with message: Invalid argument: sessionOptions.intraOpNumThreads must be a number.

@leigaol

@justinmk3 justinmk3 changed the title [Bug report]: Couldn't start client Amazon Q Language Server Couldn't start client Amazon Q Language Server: "sessionOptions.intraOpNumThreads must be a number" Jan 8, 2025
@justinmk3 justinmk3 added the partner-team Triggers issue routing to owner team label Feb 6, 2025
@ankush-rm
Copy link

ankush-rm commented Feb 12, 2025

Getting same error here...
@leigaol @aws-toolkit-automation @Will-ShaoHua

2025-02-12 12:19:35.383 [info] Log level: info, beta=false
2025-02-12 12:19:35.383 [info] Telemetry product: Amazon Q For VS Code
2025-02-12 12:19:35.383 [info] Telemetry clientId: 5cc10571-b56f-4515-a3ab-e80d090dfe16
2025-02-12 12:19:35.383 [info] Telemetry sessionId: 18aa1d86-1723-4700-a54d-012e9f1258c1
2025-02-12 12:19:35.383 [info] codewhisperer: active connection changed
2025-02-12 12:19:35.383 [info] codewhisperer: connection states
    connection isValid=false,
    connection isValidCodewhispererCoreConnection=false,
    connection isExpired=false,
    secondaryAuth isExpired=false,
    connection isUndefined=true
2025-02-12 12:19:35.447 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2025-02-12 12:19:35.448 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2025-02-12 12:19:35.804 [info] initialized 'submitFeedback' command with default feedback id: Amazon Q
2025-02-12 12:19:40.835 [info] LspController: LSP already installed
2025-02-12 12:19:40.967 [info] [Info  - 12:19:40 PM] LSP server starts
2025-02-12 12:19:41.149 [info] [Error - 12:19:41 PM] Server initialization failed.
2025-02-12 12:19:41.149 [info]   Message: Request initialize failed with message: The specified module could not be found.
\\?\c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\bin\napi-v3\win32\x64\onnxruntime_binding.node
  Code: -32603 
2025-02-12 12:19:41.150 [info] [Error - 12:19:41 PM] Starting client failed
2025-02-12 12:19:41.150 [info]   Message: Request initialize failed with message: The specified module could not be found.
\\?\c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\bin\napi-v3\win32\x64\onnxruntime_binding.node
  Code: -32603 
2025-02-12 12:19:41.150 [error] LspController: LSP failed to activate Error: Request initialize failed with message: The specified module could not be found.
\\?\c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\bin\napi-v3\win32\x64\onnxruntime_binding.node
2025-02-12 12:19:41.151 [info] [Error - 12:19:41 PM] Unhandled exception: Cannot access 'ONNX_NODE' before initialization
ReferenceError: Cannot access 'ONNX_NODE' before initialization
    at c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\extension.js:418:23585

@leigaol
Copy link
Contributor

leigaol commented Feb 12, 2025

@Dragon1573 Is it possible for you to upgrade your Amazon Q for VS Code extension version? It seems like you are using AmazonQ-For-VSCode/1.33.0. This issue was fixed in previous releases. You can also try to set the workspace index worker threads to 0.

@leigaol
Copy link
Contributor

leigaol commented Feb 12, 2025

Getting same error here... @leigaol @aws-toolkit-automation @Will-ShaoHua

2025-02-12 12:19:35.383 [info] Log level: info, beta=false
2025-02-12 12:19:35.383 [info] Telemetry product: Amazon Q For VS Code
2025-02-12 12:19:35.383 [info] Telemetry clientId: 5cc10571-b56f-4515-a3ab-e80d090dfe16
2025-02-12 12:19:35.383 [info] Telemetry sessionId: 18aa1d86-1723-4700-a54d-012e9f1258c1
2025-02-12 12:19:35.383 [info] codewhisperer: active connection changed
2025-02-12 12:19:35.383 [info] codewhisperer: connection states
    connection isValid=false,
    connection isValidCodewhispererCoreConnection=false,
    connection isExpired=false,
    secondaryAuth isExpired=false,
    connection isUndefined=true
2025-02-12 12:19:35.447 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2025-02-12 12:19:35.448 [error] CodeWhisperer: Error when fetching feature configs Error: No connection found
2025-02-12 12:19:35.804 [info] initialized 'submitFeedback' command with default feedback id: Amazon Q
2025-02-12 12:19:40.835 [info] LspController: LSP already installed
2025-02-12 12:19:40.967 [info] [Info  - 12:19:40 PM] LSP server starts
2025-02-12 12:19:41.149 [info] [Error - 12:19:41 PM] Server initialization failed.
2025-02-12 12:19:41.149 [info]   Message: Request initialize failed with message: The specified module could not be found.
\\?\c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\bin\napi-v3\win32\x64\onnxruntime_binding.node
  Code: -32603 
2025-02-12 12:19:41.150 [info] [Error - 12:19:41 PM] Starting client failed
2025-02-12 12:19:41.150 [info]   Message: Request initialize failed with message: The specified module could not be found.
\\?\c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\bin\napi-v3\win32\x64\onnxruntime_binding.node
  Code: -32603 
2025-02-12 12:19:41.150 [error] LspController: LSP failed to activate Error: Request initialize failed with message: The specified module could not be found.
\\?\c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\bin\napi-v3\win32\x64\onnxruntime_binding.node
2025-02-12 12:19:41.151 [info] [Error - 12:19:41 PM] Unhandled exception: Cannot access 'ONNX_NODE' before initialization
ReferenceError: Cannot access 'ONNX_NODE' before initialization
    at c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver\dist\extension.js:418:23585

Hi @ankush-rm , this error looks like a artifact download error. Is it possible for you to remove folder c:\Users\Remotebricks\.vscode\extensions\amazonwebservices.amazon-q-vscode-1.46.0\resources\qserver completely and restart VS Code again? It should restart the download process. Thanks!

You can also manually download the Amazon Q LSP server from here
https://aws-language-servers.us-east-1.amazonaws.com/acb6837d-6144-4ab9-b89e-f760e0d587d3/qserver-win32-x64.zip

@Dragon1573
Copy link
Author

Is it possible for you to upgrade your Amazon Q for VS Code extension version? It seems like you are using AmazonQ-For-VSCode/1.33.0. This issue was fixed in previous releases. You can also try to set the workspace index worker threads to 0.

Since GitHub Copilot announce their Free subscription on VSCode, I just migrate to it and permanently disable the installed Amazon Q.

Sorry for leaving. 🙏🏼

@justinmk3
Copy link
Contributor

This was fixed in the latest version of Amazon Q extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amazon-q bug We can reproduce the issue and confirmed it is a bug. codewhisperer network partner-team Triggers issue routing to owner team
Projects
None yet
Development

No branches or pull requests

5 participants