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

Remote Extension host terminated - Github Copilot Extension #194458

Closed
jonathanfsanchez opened this issue Sep 29, 2023 · 33 comments
Closed

Remote Extension host terminated - Github Copilot Extension #194458

jonathanfsanchez opened this issue Sep 29, 2023 · 33 comments
Assignees
Labels
extension-host Extension host issues info-needed Issue requires more information from poster

Comments

@jonathanfsanchez
Copy link

jonathanfsanchez commented Sep 29, 2023

Does this issue occur when all extensions are disabled?: Yes/No

CPUs Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz (8 x 2000)
GPU Status 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled
Load (avg) 2, 2, 3
Memory (System) 16.00GB (0.02GB free)
Process Argv --crash-reporter-id c46b0ced-b526-4115-a328-36d485d6e30c
Screen Reader no
VM 0%

I have seen a previous issue on this before but it was closed. I don't see a resolution. I have disabled all extensions but Github Copilot and everything works fine. As soon as that extension is enabled and I open a python file, remote host crashes.

Steps to Reproduce:

Start

  1. when I attach vscode to a running docker container and I have GitHub copilot running.
    I get:
Remote Extension host terminated unexpectedly 3 times within the last 5 minutes.
  1. the extensions I have enabled on a fresh profile are pylance, python, dev containers, GitHub copilot.

my base docker image is pulling from FROM ubuntu:jammy-20230308
with nothing special going on except beyond some typical packages like git and curl, a pyenv. it was working about a month ago and just started acting up. I have started 3 fresh containers and all experience the issue immediately.

only other command I ran beyond the image is apt-get update && unminimize

Dockerfile.txt

@jonathanfsanchez
Copy link
Author

More testing shows that when I open an html file for editing Copilot does not cause a remote extension crash but as soon as I open a python file it crashes. python 3.8.12

@jonathanfsanchez
Copy link
Author

https://github.com/orgs/community/discussions/67644

@jonathanfsanchez
Copy link
Author

another discussion with similar experience on python related copilot crashes.

https://github.com/orgs/community/discussions/61259

@jonathanfsanchez
Copy link
Author

appears to affect vscode 1.82x and whatever version of GitHub copilot is required for that version (>v1.120.452)

I have manually installed 1.81 and disabled vscode update / extension updates and it is working just fine.

Version: 1.81.1
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:20:33.924Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin x64 23.0.0

dev containers - v0.309.0
GitHub copilot - v1.120.452
pylance - v2023.9.30
python - v2023.14.0

@mjbvz mjbvz assigned jrieken and unassigned mjbvz Oct 3, 2023
@pankajbatra
Copy link

I also have the same issue with the Rails project in docker environment. Same Copilot extension.

@stevenh
Copy link

stevenh commented Dec 5, 2023

Seeing the same here.

@santamn
Copy link

santamn commented Dec 7, 2023

In my environment, this problem only seems to occur if a git remote repository has been set up. Just git init and creating a .git folder or committing did not reproduce this problem.

my environment:

  • VSCode: v1.84.2
  • Dev Containers: v0.321.0
  • GitHub Copilot: v1.140.0

$ ls -al

drwxr-xr-x   5 santamn  staff   160 12  7 11:15 .
drwx------@ 64 santamn  staff  2048 12  6 01:16 ..
drwxr-xr-x   3 santamn  staff    96 12  6 00:44 .devcontainer
drwxr-xr-x   9 santamn  staff   288 12  7 11:04 .git
-rw-r--r--   1 santamn  staff    95 12  7 11:01 Dockerfile

Dockerfile

FROM debian:12-slim

RUN apt-get update && apt-get install -y git

WORKDIR /workspace

COPY . .

@Yuhi-Aoki
Copy link

I have same issue in vscode-insider with pylance on devcontainer.

@jrieken jrieken assigned brettcannon and luabud and unassigned jrieken and alexdima Dec 15, 2023
@jrieken
Copy link
Member

jrieken commented Dec 15, 2023

This seems to be pylance related (and maybe already resolved?)

@edegp
Copy link

edegp commented Dec 16, 2023

@jrieken
I don't think so.
microsoft/vscode-remote-release#8967 (comment)
If I disable git extension, it does not occur.

I guess git is reading the credentials and making some error when connecting to the git remote
git extension output

2023-12-16 09:21:24.867 [info] > git rev-parse refs/remotes/origin/feat/setup1 [4ms]
2023-12-16 09:22:18.886 [info] Log level: Info
2023-12-16 09:22:18.886 [info] Validating found git in: "git"
2023-12-16 09:22:18.886 [info] Using git "2.39.2" from "git"
2023-12-16 09:22:18.886 [info] > git rev-parse --show-toplevel [93ms]
2023-12-16 09:22:18.903 [info] > git rev-parse --git-dir --git-common-dir [5ms]
2023-12-16 09:22:18.926 [info] Open repository: /workspaces/PropertyInsight
2023-12-16 09:22:18.982 [info] > git rev-parse --show-toplevel [17ms]
2023-12-16 09:22:18.986 [info] > git config --get commit.template [38ms]
2023-12-16 09:22:19.046 [info] > git rev-parse --show-toplevel [40ms]
2023-12-16 09:22:19.091 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/feat/setup1 refs/remotes/feat/setup1 [50ms]
2023-12-16 09:22:19.115 [warning] ENOENT: no such file or directory, open '/workspaces/PropertyInsight/.git/refs/remotes/origin/feat/setup1'

git auth output

2023-12-16 18:48:13.455 [info] Got 3 verified sessions.
2023-12-16 18:48:13.455 [info] Got 3 sessions for ...
2023-12-16 18:48:13.561 [info] Getting sessions for all scopes...
2023-12-16 18:48:13.561 [info] Got 3 sessions for ...
2023-12-16 18:48:13.707 [info] Getting sessions for user:email...
2023-12-16 18:48:13.707 [info] Got 1 sessions for user:email...
2023-12-16 18:48:17.152 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:48:17.152 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 18:48:22.714 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:48:22.714 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 18:48:26.979 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:48:26.979 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 18:55:09.488 [info] Reading sessions from keychain...
2023-12-16 18:55:09.501 [info] Getting sessions for all scopes...
2023-12-16 18:55:09.501 [info] Got stored sessions!
2023-12-16 18:55:09.501 [info] Got 3 verified sessions.
2023-12-16 18:55:09.502 [info] Got 3 sessions for ...
2023-12-16 18:55:09.532 [info] Getting sessions for all scopes...
2023-12-16 18:55:09.532 [info] Got 3 sessions for ...
2023-12-16 18:55:09.805 [info] Getting sessions for user:email...
2023-12-16 18:55:09.805 [info] Got 1 sessions for user:email...
2023-12-16 18:55:13.666 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:55:13.666 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 18:55:19.181 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:55:19.181 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 18:55:24.179 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:55:24.179 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 18:59:18.413 [info] Reading sessions from keychain...
2023-12-16 18:59:18.417 [info] Getting sessions for all scopes...
2023-12-16 18:59:18.466 [info] Getting sessions for user:email...
2023-12-16 18:59:18.504 [info] Got stored sessions!
2023-12-16 18:59:18.505 [info] Got 3 verified sessions.
2023-12-16 18:59:18.505 [info] Got 3 sessions for ...
2023-12-16 18:59:18.506 [info] Got 1 sessions for user:email...
2023-12-16 18:59:18.562 [info] Getting sessions for all scopes...
2023-12-16 18:59:18.562 [info] Got 3 sessions for ...
2023-12-16 18:59:46.281 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 18:59:46.281 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:00:59.423 [info] Reading sessions from keychain...
2023-12-16 19:00:59.432 [info] Getting sessions for all scopes...
2023-12-16 19:00:59.432 [info] Got stored sessions!
2023-12-16 19:00:59.432 [info] Got 3 verified sessions.
2023-12-16 19:00:59.432 [info] Got 3 sessions for ...
2023-12-16 19:00:59.592 [info] Getting sessions for all scopes...
2023-12-16 19:00:59.597 [info] Got 3 sessions for ...
2023-12-16 19:00:59.707 [info] Getting sessions for user:email...
2023-12-16 19:00:59.707 [info] Got 1 sessions for user:email...
2023-12-16 19:01:03.294 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:01:03.294 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:01:09.540 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:01:09.541 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:01:13.848 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:01:13.849 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:03:10.171 [info] Reading sessions from keychain...
2023-12-16 19:03:10.171 [info] Getting sessions for all scopes...
2023-12-16 19:03:10.171 [info] Got stored sessions!
2023-12-16 19:03:10.171 [info] Got 3 verified sessions.
2023-12-16 19:03:10.171 [info] Got 3 sessions for ...
2023-12-16 19:03:10.552 [info] Getting sessions for user:email...
2023-12-16 19:03:10.552 [info] Got 1 sessions for user:email...
2023-12-16 19:03:10.708 [info] Getting sessions for all scopes...
2023-12-16 19:03:10.709 [info] Got 3 sessions for ...
2023-12-16 19:03:14.658 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:03:14.658 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:03:20.027 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:03:20.027 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:03:25.263 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:03:25.263 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:13:15.177 [info] Reading sessions from keychain...
2023-12-16 19:13:15.177 [info] Getting sessions for all scopes...
2023-12-16 19:13:15.270 [info] Got stored sessions!
2023-12-16 19:13:15.270 [info] Got 3 verified sessions.
2023-12-16 19:13:15.271 [info] Got 3 sessions for ...
2023-12-16 19:13:16.537 [info] Getting sessions for all scopes...
2023-12-16 19:13:16.538 [info] Got 3 sessions for ...
2023-12-16 19:13:17.818 [info] Getting sessions for user:email...
2023-12-16 19:13:17.819 [info] Got 1 sessions for user:email...
2023-12-16 19:13:22.441 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:13:22.441 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:13:26.784 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:13:26.784 [info] Got 1 sessions for read:user,repo,user:email,workflow...
2023-12-16 19:13:31.298 [info] Getting sessions for read:user,repo,user:email,workflow...
2023-12-16 19:13:31.311 [info] Got 1 sessions for read:user,repo,user:email,workflow...

@edegp
Copy link

edegp commented Dec 16, 2023

BINGO!!
I disabled GitHub Authentication extension, this problem does not occur.
But I can push and pull from git cli.

@edegp
Copy link

edegp commented Dec 16, 2023

@jrieken
@brettcannon
@luabud
I solved my problem, this is caused by there is difference in between crediential manager user setting and config user.
Thank you for replying

P.S
Rebuild after reset user.email and user.name on local, but this problem occur again.
I can handle it by disabling and then enabling again and reload window on GitHub Authentication extension on remote.

@TylerLeonhardt
Copy link
Member

@lszomoru to me, this seems like the Git extension using the wrong credentials when setting up the remote.

@lszomoru
Copy link
Member

@TylerLeonhardt, as far as I understand things, the git extension itself knows nothing about credentials. It exposes extension API, that other extensions can use (ex: GitHub extension) to register a credential provider. If no credential providers are registered, the git extension will show a username/password quick input widget for the use to enter credentials. The entered credentials are not cached.

@TylerLeonhardt
Copy link
Member

@lszomoru doesn't GCM get used somewhere? If so, what's the precedence of that auth vs the token you get from the GitHub extension?

@lszomoru
Copy link
Member

VS Code is the last participant (uses GIT_ASKPASS environment variable) in the git authentication pipeline, as it's crucial to honour the user's auth settings. If the user has GCM configured, the auth request will never reach VS Code. If the auth request reaches VS Code, the git extension checks for registered credential providers, and if none exist for the remote a quick input widget is being shown to enter the username, password.

@TylerLeonhardt
Copy link
Member

Ok so @edegp disabling the GitHub Authentication extension signals to me that maybe the token expired somehow... but there aren't any logs that say why it expired or that the token is invalid at all... al least in this thread. @lszomoru do you have logs in Git somewhere where this might be shown?

@stevenh
Copy link

stevenh commented Dec 18, 2023

In my case closing ALL vscode windows and loading back up fixed the issue, so something is getting into a bad state, which reloading a single window doesn't fix, so points to some shared state common between all windows.

In my case all Windows were started from WSL, so using remote extensions if that's important.

@jonathanfsanchez
Copy link
Author

Hmm I will test later tonight but in my experience it was definitely not related to git credentials as the only fix was to downgrade vscode and copilot to specific versions. Perhaps that may solve some issues but don’t think they’re correlated.

@stevenh
Copy link

stevenh commented Dec 18, 2023

If you had to downgrade, that would have likely needed to remove all shared state, so "could" be related to what I saw.

@edegp
Copy link

edegp commented Dec 19, 2023

@jonathanfsanchez
@stevenh
This problem not occur in
VSCode: v1.81.1
Dev Containers: v0.309.0
GitHub Copilot: v1.143.0

@edegp
Copy link

edegp commented Dec 19, 2023

This is when the Error logto the extension host (remote).
on VS Code 1.85
on Dev conatiner v0.327.0
Only turn on Dev container and buildin.
remote_error_log_1_cycle.txt

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Dec 20, 2023

Can you please attach the output channel (ctrl/cmd+shift+u) of:

  • "GitHub Copilot Chat"
  • "Extension Host (Remote)"
  • "Extension Host"
  • "Main"
  • "Window"

Some of these may be empty, but anyway I'm curious what we see in there.

@stevenh
Copy link

stevenh commented Dec 21, 2023

@aweingarten
Copy link

aweingarten commented Jan 10, 2024

@TylerLeonhardt:

FWIW seeing identical issue but in my case its the minute I navigate to a go file.
extension-host.log
window.log
main.log
extension-host-remote.log
github.log
github authentication.log
github-Copilot-chat.log

@aweingarten
Copy link

FWIW this also happens for me with python files.

@heidimhurst
Copy link

I'm also seeing this with python files, which is very irritating. Downgrading per the below mitigates the issue and I'm able to use Copilot again.

@jonathanfsanchez @stevenh This problem not occur in VSCode: v1.81.1 Dev Containers: v0.309.0 GitHub Copilot: v1.143.0

@gloomylumi
Copy link

gloomylumi commented Jan 27, 2024

Mac users may find this workaround, referenced in another thread, helpful. The only other workaround that was working for me previously was downgrading.

I believe the issue may not originate from the vscode/devcontainer side. In my situation, it turned out to be a Docker virtualization issue on Mac OS. I switched from VirtioFS to gRPC FUSE and disabled 'Use Virtualization Framework' in my Docker Desktop settings, as suggested in this docker/for-mac#6824. These changes resolved the problem. It seems to be a good temporary workaround.

The settings referenced are accessed from Docker > Settings > General.

@aweingarten
Copy link

aweingarten commented Jan 31, 2024

+1 @gloomylumi work-around worked for me. Thanks!

@mvobbi
Copy link

mvobbi commented Apr 18, 2024

+1 for this ... I have been waiting for like 6 months to find this fix @gloomylumi

This seems to be a big enough problem that it really should be called out by GitHub CoPilot, especially when paying for it.

@TylerLeonhardt
Copy link
Member

Coming back to this, this thread is deep. I want to get to the root of the problem. Can you all please try running the >Help: Start Extension Bisect command and tell me what the output of that is?

@TylerLeonhardt TylerLeonhardt added the info-needed Issue requires more information from poster label Apr 26, 2024
@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
@asdfML
Copy link

asdfML commented May 9, 2024

Docker Desktop v4.30 has been released. It contains a fix for this issue. You can now try to enable virtualization: VirtuoFS and 'Use Virtualization Framework' option.

P.S. Personally, I've switched to OrbStack and it solves all my problems (performance, stability) with Docker Desktop, so you might want to give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-host Extension host issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests