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

Electron fetcher not available #1192

Closed
aqlkzf opened this issue May 8, 2024 · 8 comments
Closed

Electron fetcher not available #1192

aqlkzf opened this issue May 8, 2024 · 8 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@aqlkzf
Copy link

aqlkzf commented May 8, 2024

Description:
The Copilot output shows the message "Using Helix fetcher, Electron fetcher is not available" repeatedly. This prevents Copilot from utilizing Electron fetcher for data fetching tasks.

Expected Behavior:
Copilot should have access to the Electron fetcher functionality as expected.

Steps to Reproduce:

  1. Using WSL plugin connect to wsl2.
  2. Use Copilot to perform tasks that involve data fetching.

Additional Information:

  • Output:
    2024-05-08 15:27:22.587 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
    2024-05-08 15:27:24.641 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
    2024-05-08 15:27:24.641 [info] [code-referencing] Public code references are enabled.
    2024-05-08 15:27:24.642 [info] [auth] Successfully authenticated

  • Environment: Using VS Code with Copilot, possibly on Windows Subsystem for Linux (WSL).
    -## Copilot

  • Version: 1.187.0

  • Build: prod

  • Editor: vscode/1.89.0

Environment

  • http_proxy: http://127.0.0.1:7890
  • https_proxy: http://127.0.0.1:7890
  • no_proxy: 127.0.0.1,login.microsoftonline.com,192.168.,172.31.,172.30.,172.29.,172.28.,172.27.,172.26.,172.25.,172.24.,172.23.,172.22.,172.21.,172.20.,172.19.,172.18.,172.17.,172.16.,10.,127.*,localhost,
  • SSL_CERT_FILE: n/a
  • SSL_CERT_DIR: n/a
  • OPENSSL_CONF: n/a

Feature Flags

  • Send Restricted Telemetry: enabled
  • Chat: enabled

Node setup

  • Number of root certificates: 141
  • Operating system: Linux
  • Operating system version: 5.15.146.1-microsoft-standard-WSL2
  • Operating system architecture: x64
  • NODE_OPTIONS: n/a
  • NODE_EXTRA_CA_CERTS: n/a
  • NODE_TLS_REJECT_UNAUTHORIZED: n/a
  • tls default min version: TLSv1.2
  • tls default max version: TLSv1.3

Network Configuration

  • Proxy host: 127.0.0.1
  • Proxy port: 7890
  • Kerberos SPN: n/a
  • Reject unauthorized: enabled
  • Fetcher: HelixFetcher

Reachability

  • github.com: HTTP 200 -
  • copilot-proxy.githubusercontent.com: HTTP 200 -
  • api.githubcopilot.com: HTTP 200 -
  • default.exp-tas.com: HTTP 200 -

VS Code Configuration

  • HTTP proxy:
  • HTTP proxy authentication: n/a
  • Proxy Strict SSL: true
  • Extension HTTP proxy support: override

Extensions

  • Is win-ca installed?: false
  • Is mac-ca installed?: false

Authentication

  • GitHub username: aqlkzf
@github-actions github-actions bot added the triage-needed Issues needing to be assigned to the prospective feature owner label May 8, 2024
@digitarald digitarald assigned alexdima and unassigned digitarald May 8, 2024
@github-actions github-actions bot removed the triage-needed Issues needing to be assigned to the prospective feature owner label May 8, 2024
@digitarald digitarald added the info-needed Issue requires more information from poster label May 8, 2024
@digitarald
Copy link
Contributor

@aqlkzf can you confirm the issue you are seeing. Is this just about presence of the logs or some bug this causes with using Copilot?

@LayneIns
Copy link

LayneIns commented May 9, 2024

Same here. Copilot does not recommend code complete.

2024-05-09 23:39:52.614 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2024-05-09 23:39:52.614 [info] [code-referencing] Public code references are enabled.
2024-05-09 23:39:52.615 [info] [auth] Sucessfully authenticated

@CherryDT
Copy link

CherryDT commented May 10, 2024

Possibly related: https://github.com/orgs/community/discussions/123220

For me it is no longer working at all, crashing on startup with this error inside of electronFetcher.ts:

2024-05-10 06:19:24.171 [error] Activating extension GitHub.copilot failed due to an error:
2024-05-10 06:19:24.171 [error] TypeError: Invalid version. Must be a string. Got type "undefined".
    at new SemVer (/home/david/.vscode-server/extensions/github.copilot-1.188.867/node_modules/semver/classes/semver.js:19:13)
    at compare (/home/david/.vscode-server/extensions/github.copilot-1.188.867/node_modules/semver/functions/compare.js:3:3)
    at lt (/home/david/.vscode-server/extensions/github.copilot-1.188.867/node_modules/semver/functions/lt.js:2:29)
    at Function.create (/home/david/.vscode-server/extensions/github.copilot-1.188.867/extension/src/electronFetcher.ts:15:13)
    at createExtensionContext (/home/david/.vscode-server/extensions/github.copilot-1.188.867/extension/src/extension.ts:222:38)
    at activate (/home/david/.vscode-server/extensions/github.copilot-1.188.867/extension/src/extension.ts:98:23)
    at Function.kb (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:161:13465)
    at Function.jb (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:161:13175)
    at /home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:161:11197
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at h.n (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:145:6281)
    at h.m (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:145:6244)
    at h.l (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:145:5701)

EDIT: I found the following workaround:

  1. Open the file ~/.vscode-server/extensions/github.copilot-1.188.867/dist/extension.js and search for create(t,a=process.versions){if(!(0,Ipe.lt)(a.electron,"28.2.5"))
  2. Insert ??'0.0.0' after a.electron so it looks like this now: create(t,a=process.versions){if(!(0,Ipe.lt)(a.electron??'0.0.0',"28.2.5"))
  3. Save and restart VS Code

@Ennis12Noble
Copy link

Possibly related: https://github.com/orgs/community/discussions/123220

For me it is no longer working at all, crashing on startup with this error inside of electronFetcher.ts:

2024-05-10 06:19:24.171 [error] Activating extension GitHub.copilot failed due to an error:
2024-05-10 06:19:24.171 [error] TypeError: Invalid version. Must be a string. Got type "undefined".
    at new SemVer (/home/david/.vscode-server/extensions/github.copilot-1.188.867/node_modules/semver/classes/semver.js:19:13)
    at compare (/home/david/.vscode-server/extensions/github.copilot-1.188.867/node_modules/semver/functions/compare.js:3:3)
    at lt (/home/david/.vscode-server/extensions/github.copilot-1.188.867/node_modules/semver/functions/lt.js:2:29)
    at Function.create (/home/david/.vscode-server/extensions/github.copilot-1.188.867/extension/src/electronFetcher.ts:15:13)
    at createExtensionContext (/home/david/.vscode-server/extensions/github.copilot-1.188.867/extension/src/extension.ts:222:38)
    at activate (/home/david/.vscode-server/extensions/github.copilot-1.188.867/extension/src/extension.ts:98:23)
    at Function.kb (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:161:13465)
    at Function.jb (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:161:13175)
    at /home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:161:11197
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at h.n (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:145:6281)
    at h.m (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:145:6244)
    at h.l (/home/david/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/out/vs/workbench/api/node/extensionHostProcess.js:145:5701)

EDIT: I found the following workaround:

  1. Open the file ~/.vscode-server/extensions/github.copilot-1.188.867/dist/extension.js and search for create(t,a=process.versions){if(!(0,Ipe.lt)(a.electron,"28.2.5"))
  2. Insert ??'0.0.0' after a.electron so it looks like this now: create(t,a=process.versions){if(!(0,Ipe.lt)(a.electron??'0.0.0',"28.2.5"))
  3. Save and restart VS Code

not work

@alexdima
Copy link
Member

This is as designed.

Under remote scenarios, like WSL, the remote extension host is executing in a pure nodejs runtime. In such environments (the remote extension host), Electron itself and the Chromium's network stack are not available, so the Electron Fetcher cannot be used. So it is completely expected that in such scenarios the Helix Fetcher is used.

Are you observing any other network related issues besides the log statement?

@AngelOnFira
Copy link

I'm getting the same error as @CherryDT, though Copilot doesn't work only while I'm in a devcontainer. Outside it works just fine.

@aqlkzf
Copy link
Author

aqlkzf commented May 11, 2024

This is as designed.

Under remote scenarios, like WSL, the remote extension host is executing in a pure nodejs runtime. In such environments (the remote extension host), Electron itself and the Chromium's network stack are not available, so the Electron Fetcher cannot be used. So it is completely expected that in such scenarios the Helix Fetcher is used.

Are you observing any other network related issues besides the log statement?

Thanks for your attention.
Sometimes copilot can work but is really slow, it takes a long time for copilot to collect information and send requests (Not the Internet connection issue). If I do not use copilot in wsl, just use it in my Windows system, It's much faster for complementation.

@alexdima
Copy link
Member

alexdima commented May 14, 2024

I'm getting the same error as @CherryDT, though Copilot doesn't work only while I'm in a devcontainer. Outside it works just fine.

FYI @chrmarti . @AngelOnFira Could you please create a separate issue detailing your network environment?


If I do not use copilot in wsl, just use it in my Windows system, It's much faster for complementation.

@aqlkzf This sounds like an unrelated problem. Please consider creating a new thread at https://github.com/orgs/community/discussions/categories/copilot


Given this log message "Electron fetcher not available" is not a problem per se, I'm going to close this issue for now to avoid "me too"s that are unrelated. If you end up reading this, please create a new issue detailing your environment.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants