microsoft / vscode-copilot-release

Feedback on GitHub Copilot Chat UX in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat
Creative Commons Attribution 4.0 International
334 stars 33 forks source link

UNABLE_TO_GET_ISSUER_CERT_LOCALLY in Copilot Chat #525

Open pawsaw opened 1 year ago

pawsaw commented 1 year ago

Steps to Reproduce:

  1. Ask anything in Chat image
devm33 commented 6 months ago

@EliiseS hm strange, just to sanity check, is that where you have it in your settings json file?

  "github.copilot.advanced": {
    "debug.useElectronFetcher": true
  },

Also in the GitHub Copilot (not chat) output panel do you see [info] [fetcher] Using Electron fetcher, debug flag is enabled.?

alexdima commented 6 months ago

@EliiseS Are you using VS Code remote like SSH, WSL, Dev Containers or Tunnels ?

EliiseS commented 6 months ago

@alexdima I am using that exactly, for good measure I even set all other fetchers to false. I only get the log message of: [info] [FetcherService] Using Helix fetcher

@devm33 Ah, I am using a tunnel to a devcontainer, which runs through WSL.

On regular windows the copilot chat actually works perfectly:

2024-04-15 15:20:18.925 [info] [FetcherService] Using Helix fetcher
2024-04-15 15:20:18.925 [info] [gitExtensionService] Initializing Git extension service.
2024-04-15 15:20:18.925 [info] [gitExtensionService] Successfully activated the vscode.git extension.
2024-04-15 15:20:18.925 [info] [gitExtensionService] Enablement state of the vscode.git extension: true.
2024-04-15 15:20:18.925 [info] [gitExtensionService] Successfully registered Git commit message provider.
2024-04-15 15:20:19.655 [info] [auth] Logged in as EliiseS
2024-04-15 15:20:19.979 [info] [chat] copilot token chat_enabled: true
2024-04-15 15:20:19.983 [info] [chat] Registration of interactive providers failed:,Error: Extension 'GitHub.copilot-chat' CANNOT use API proposal: aiTextSearchProvider.
Its package.json#enabledApiProposals-property declares: handleIssueUri, interactive, terminalDataWriteEvent, terminalExecuteCommandEvent, terminalSelection, terminalQuickFixProvider, chatParticipant, chatParticipantAdditions, defaultChatParticipant, chatVariableResolver, chatProvider, mappedEditsProvider, aiRelatedInformation, codeActionAI, findTextInFiles, textSearchProvider, contribSourceControlInputBoxMenu, newSymbolNamesProvider, findFiles2, extensionsAny, authLearnMore, testObserver but NOT aiTextSearchProvider.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api GitHub.copilot-chat
2024-04-15 15:20:19.983 [info] [githubTitleAndDescriptionProvider] Initializing GitHub PR title and description provider provider.
2024-04-15 15:20:19.983 [info] [githubTitleAndDescriptionProvider] GitHub.vscode-pull-request-github extension is not yet activated.
2024-04-15 15:20:19.991 [info] [auth] Got Copilot token for EliiseS
2024-04-15 15:20:27.520 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions
2024-04-15 15:20:27.520 [info] [chat fetch] modelMaxPromptTokens 3072
2024-04-15 15:20:27.520 [info] [chat fetch] modelMaxResponseTokens 4096
2024-04-15 15:20:27.520 [info] [chat fetch] chat model gpt-4
2024-04-15 15:20:30.417 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 2896 ms
2024-04-15 15:20:30.440 [info] [streamMessages] message 0 returned. finish reason: [stop]
2024-04-15 15:20:30.441 [info] [streamChoices] request done: requestId: [8e03e798-97ff-46ad-8d10-a29303d2e942] responseId: [8e03e798-97ff-46ad-8d10-a29303d2e942] model deployment ID: []
2024-04-15 15:20:30.445 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions
2024-04-15 15:20:30.445 [info] [chat fetch] modelMaxPromptTokens 7168
2024-04-15 15:20:30.445 [info] [chat fetch] modelMaxResponseTokens 4096
2024-04-15 15:20:30.445 [info] [chat fetch] chat model gpt-3.5-turbo
2024-04-15 15:20:31.510 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 1065 ms
2024-04-15 15:20:31.543 [info] [streamMessages] message 0 returned. finish reason: [stop]
2024-04-15 15:20:31.544 [info] [streamChoices] request done: requestId: [17e35bac-66d0-46b3-a979-0b6d58375af5] responseId: [17e35bac-66d0-46b3-a979-0b6d58375af5] model deployment ID: [x4dff5e5d11fc]
2024-04-15 15:20:46.327 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions
2024-04-15 15:20:46.327 [info] [chat fetch] modelMaxPromptTokens 3072
2024-04-15 15:20:46.327 [info] [chat fetch] modelMaxResponseTokens 4096
2024-04-15 15:20:46.327 [info] [chat fetch] chat model gpt-4
2024-04-15 15:20:49.819 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 3491 ms
2024-04-15 15:20:49.857 [info] [streamMessages] message 0 returned. finish reason: [stop]
2024-04-15 15:20:49.857 [info] [streamChoices] request done: requestId: [9400238c-4450-4996-a89c-67cb9a6d3897] responseId: [9400238c-4450-4996-a89c-67cb9a6d3897] model deployment ID: []
2024-04-15 15:20:49.863 [info] [chat fetch] url https://api.githubcopilot.com/chat/completions
2024-04-15 15:20:49.863 [info] [chat fetch] modelMaxPromptTokens 7168
2024-04-15 15:20:49.863 [info] [chat fetch] modelMaxResponseTokens 4096
2024-04-15 15:20:49.863 [info] [chat fetch] chat model gpt-3.5-turbo
2024-04-15 15:20:50.701 [info] [chat fetch] request.response: [https://api.githubcopilot.com/chat/completions], took 837 ms
2024-04-15 15:20:50.723 [info] [streamMessages] message 0 returned. finish reason: [stop]
2024-04-15 15:20:50.724 [info] [streamChoices] request done: requestId: [eb166036-3202-4e56-b392-5ad9bb0cfd4b] responseId: [eb166036-3202-4e56-b392-5ad9bb0cfd4b] model deployment ID: [x4dff5e5d11fc]

On just WSL, it won't even let me log in:

2024-04-15 13:41:54.223 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2024-04-15 13:44:07.656 [error] [auth] Extension activation failed: "tunneling socket could not be established, cause=connect ETIMEDOUT 127.0.0.42:9000"

On just devcontainer, I get the same error as in devcontainer w/ tunneling.

caoshuai619 commented 6 months ago

Hello! For anyone still having this issue, turning this setting on: image solved it for me (http.experimental.systemCertificatesV2)

thanks very much. This works for me when using copilot chat in wsl2.

tlewers01 commented 6 months ago

"debug.useNodeFetcher": true

I am also behind Zscaler and this seams to have fixed the issue for me.

ChrisKibble commented 6 months ago

Just to add to the solution and description, I'm also behind Zscaler.

The reason it's not working out of the box is that your companies are using SSL inspection which involves replacing the certificate you're using on some or all sites so they can decrypt/re-encrypt the traffic, usually to log or analyze. You can confirm this by visiting https://api.githubcopilot.com/ and looking at the parent of the issued cert, it'll be Zscaler. The same is likely true for other proxy or VPN solutions that work similarly.

The internal (to the company) fix would be to stop SSL inspection on the domains identified here.

For me, the solution to use the pre-release of the GitHub Copilot and GitHub Copilot Chat along with the latest version of VSCode resolved the issue. I did not need to modify the Proxy SSL or the NodeFetcher values.

Version: 1.89.0 (user setup) Commit: b58957e67ee1e712cebf466b995adf4c5307b2bd Date: 2024-05-01T02:09:22.859Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Windows_NT x64 10.0.22631

xaviervv commented 5 months ago

I had this issue on the newest version of 0.15.2, rolling back to 0.15.1 solved it for me just in case I had also rolled back GitHub Copilot extension from 1.195.0 to 1.194

GitHubCanada commented 5 months ago

https://github.com/microsoft/vscode-copilot-release/issues/525#issuecomment-2015746667

this work for me.

sairaghavak commented 1 month ago

This comment worked for me.

I am behind Zscaler and in WSL. And this has worked in my case

Updated the following in ~/.vscode-server/data/Machine/settings.json

"http.proxyStrictSSL": false,

And in workspace settings.json Updated the following

"github.copilot.advanced": {
    "debug.useNodeFetcher": true
},
jejamnicki-fadv commented 5 days ago

@sairaghavak thank you! same on WSL behind Zscaler

in my case http.proxyStrictSSL was true by default and it was working anyway

This comment worked for me.

I am behind Zscaler and in WSL. And this has worked in my case

Updated the following in ~/.vscode-server/data/Machine/settings.json

"http.proxyStrictSSL": false, And in workspace settings.json Updated the following

"github.copilot.advanced": { "debug.useNodeFetcher": true },