Vscode: Extension host terminated unexpectedly. Please reload the window to recover.

Created on 15 May 2017  路  45Comments  路  Source: microsoft/vscode

  • VSCode Version: Code 1.12.1 (f6868fce3eeb16663840eb82123369dec6077a9b, 2017-05-04T21:26:50.689Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:

|Extension|Author|Version|
|---|---|---|
|npm-intellisense|christian-kohler|1.3.0|
|vscode-eslint|dbaeumer|1.2.8|
|githistory|donjayamanne|0.2.0|
|python|donjayamanne|0.6.4|
|tslint|eg2|0.15.0|
|csharpextensions|jchannon|1.3.0|
|docomment|k--kato|0.0.14|
|vue|liuji-jim|0.1.5|
|mssql|ms-mssql|1.0.0|
|csharp|ms-vscode|1.9.0|
|PowerShell|ms-vscode|1.0.0|
|vetur|octref|0.6.8|
|material-icon-theme|PKief|2.0.5|
|view-in-browser|qinjia|0.0.5|
|code-settings-sync|Shan|2.7.0|
|html-css-class-completion|Zignd|1.2.0|;


Steps to Reproduce:

1.Open the VSCode will show this error.

freeze-slow-crash-leak needs more info

Most helpful comment

I try deleted D:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\git folder. , then this issue has resolved. My god.

All 45 comments

Same here. Fresh install of VS 1.12.1 @ Win7. VS directly crashes after launch even if I call Code.exe --disable-extensions

Dev Console logs:
Der Erweiterungshost wurde unerwartet beendet. Bitte laden Sie das Fenster erneut, um ihn wiederherzustellen. e.doShow @ messageService.ts:125 e.show @ messageService.ts:104 d.onExit @ extensionHost.ts:320 (anonymous) @ extensionHost.ts:147 emitTwo @ events.js:106 emit @ events.js:191 __dirname.ChildProcess._handle.onexit @ internal/child_process.js:215 extensionHost.ts:324 Extension host terminated unexpectedly. Code: 3221226356 Signal: null d.onExit @ extensionHost.ts:324 (anonymous) @ extensionHost.ts:147 emitTwo @ events.js:106 emit @ events.js:191 __dirname.ChildProcess._handle.onexit @ internal/child_process.js:215

when I open dev tool. switch to console tab, find this error.
qq 20170516105858

maximum 128 reports/day
reporter is electron-crash-service
[6188:22364:0516/110142.781:ERROR:crash_service.cc(295)] could not start dumper
[22920:20560:0516/110149.010:VERBOSE1:crash_service.cc(325)] client end. pid = 14748
[22920:19688:0516/110150.774:VERBOSE1:crash_service.cc(317)] client start. pid = 13484
[22920:19688:0516/110150.778:VERBOSE1:crash_service.cc(317)] client start. pid = 12880
[4840:18156:0516/110150.786:VERBOSE1:crash_service_main.cc(78)] Session start. cmdline is [--reporter-url=https://ticinocrashreporter.azurewebsites.net/crash --application-name=VSCode "--crashes-directory=C:\Usersxxxxx\AppData\Local\Temp\VSCode Crashes" --v=1]
[4840:18156:0516/110150.789:VERBOSE1:crash_service.cc(142)] window handle is 03BC093A
[4840:18156:0516/110150.789:VERBOSE1:crash_service.cc(284)] pipe name is \.\pipe\VSCode Crash Service
dumps at C:\Usersxxxxx\AppData\Local\Temp\VSCode Crashes
[4840:18156:0516/110150.789:VERBOSE1:crash_service.cc(288)] checkpoint is C:\Usersxxxxx\AppData\Local\Temp\VSCode Crashes\crash_checkpoint.txt
server is https://ticinocrashreporter.azurewebsites.net/crash
maximum 128 reports/day
reporter is electron-crash-service
[4840:18156:0516/110150.789:ERROR:crash_service.cc(295)] could not start dumper
[17772:12484:0516/110150.791:VERBOSE1:crash_service_main.cc(78)] Session start. cmdline is [--reporter-url=https://ticinocrashreporter.azurewebsites.net/crash --application-name=VSCode "--crashes-directory=C:\Usersxxxxx\AppData\Local\Temp\VSCode Crashes" --v=1]
[17772:12484:0516/110150.794:VERBOSE1:crash_service.cc(142)] window handle is 001009F4
[17772:12484:0516/110150.794:VERBOSE1:crash_service.cc(284)] pipe name is \.\pipe\VSCode Crash Service
dumps at C:\Usersxxxxx\AppData\Local\Temp\VSCode Crashes
[17772:12484:0516/110150.794:VERBOSE1:crash_service.cc(288)] checkpoint is C:\Usersxxxxxx\AppData\Local\Temp\VSCode Crashes\crash_checkpoint.txt
server is https://ticinocrashreporter.azurewebsites.net/crash
maximum 128 reports/day
reporter is electron-crash-service
[17772:12484:0516/110150.794:ERROR:crash_service.cc(295)] could not start dumper
[22920:20560:0516/110201.838:VERBOSE1:crash_service.cc(325)] client end. pid = 13484
[22920:20560:0516/110202.159:VERBOSE1:crash_service.cc(325)] client end. pid = 12880
[22920:20560:0516/110202.159:VERBOSE1:crash_service.cc(325)] client end. pid = 12880
[22920:20560:0516/110203.160:VERBOSE1:crash_service.cc(346)] zero clients. exiting
[22920:16980:0516/110203.160:VERBOSE1:crash_service.cc(486)] session ending..
[22920:16980:0516/110203.160:VERBOSE1:crash_service.cc(491)] clients connected :4
clients terminated :4
dumps serviced :0
dumps reported :0
[22920:16980:0516/110203.160:VERBOSE1:crash_service_main.cc(99)] Session end. return code is 0

Can you try out our insider release?

When I tried the insider release.
It still have the error.
I`m using windows 10.
And when I disable the Python extension ,the error disappeared.

@joaomoreno Mends it for me.

When I tried the insider release.
It still have the error.

I delete AppData, and reinstall VSCode still have this error. none of them extensions in VSCode.

What information do I need to provide? @egamma

@netcore-jroger Did you see @OYMiss's comment?

And when I disable the Python extension ,the error disappeared.

Is it true also for you?

@joaomoreno now I have nothing plugins in VSCode.The error always exist.

any body Still need me to provide any information?

If you disable git git.enabled = false, does the error still occur?

@joaomoreno yes! Still occur.

qq 20170524160936

That's good. @bpasero any ideas?

Here is a checklist to find out more about the freeze/slow/crash

  • [ ] it reproduces with extensions disabled (code --disable-extensions from the command line - NOT the integrated terminal of Code)

    • if it does not reproduce with extensions disabled, you can stop testing and report this!

  • [ ] it was not happening in the previous stable release
  • [ ] it reproduces in insiders builds (get it from here)
  • [ ] there is no suspicious output when running from the command line (code --verbose)
  • [ ] there is no suspicious output in the window itself (Help | Toggle Developer Tools | Console)
  • [ ] it reproduces on Windows, Linux and Mac
  • [ ] it reproduces after deleting <appdata>/User/keybindings.json and <appdata>/User/settings.json (backup first! see below for paths)
  • [ ] it reproduces when opening empty (code -n from the command line)
  • [ ] it reproduces opening any folder
  • [ ] it reproduces opening any file
  • [ ] it reproduces when only having a single window open
  • [ ] it reproduces by just using Code without external tools running on the same folder
  • [ ] it reproduces from a workspace that is not under Git version control
  • [ ] it reproduces independently if a file is opened or not after startup
  • [ ] it reproduces when running with GPU disabled (code --disable-gpu)
  • [ ] it reproduces when being offline
  • [ ] it reproduces when disabling the file watching (set files.watcherExclude to "**/**": true)
  • [ ] it reproduces after uninstalling and reinstalling
  • [ ] it reproduces after deleting the application data directory (backup first! see below for paths)
  • [ ] I have not played around with permissions or ran Code as administrator
  • [ ] I am seeing a single CPU process spin high (please share the full command line arguments)
  • [ ] I am seeing Code consuming lots of memory in a short time

Application Data Directory for VS Code:

  • Windows: C:\Users\<user>\AppData\Roaming\Code
  • Mac: /Users/<user>/Library/Application Support/Code
  • Linux: /home/<user>/.config/Code

Application Data Directory for VS Code Insiders:

  • Windows: C:\Users\<user>\AppData\Roaming\Code - Insiders
  • Mac: /Users/<user>/Library/Application Support/Code - Insiders
  • Linux: /home/<user>/.config/Code - Insiders

use command line. code.exe --verbose
verbose

verbose-1

disable-extensions

disable-gpu

filewatchers

toggle dev tool still get same error.
same-error

memory cpu
memory-cpu

  • [x] ran Code as administrator still get same error.
  • [x] anywhere open Code still get same error.
  • [x] code.exe -n still.

@netcore-jroger strange, thanks for going through the list. I wonder if this is locale, keyboard and environment related.

Does it matter if you start from the command line vs. from the dock?

@bpasero same error.

@netcore-jroger does it reproduce if you startup stable on a different data directory: code --user-data-dir <some folder>?

ok, let me try.

same error.

qq 20170526141251

I have the same issue, and it seems to happen if running visual studio code as an non-admin windows user (but worked as non-admin in previous versions). This does not occur as an admin user.

Went through this checklist below:

  • [x] it reproduces with extensions disabled (code --disable-extensions from the command line - NOT the integrated terminal of Code)
  • [ ] if it does not reproduce with extensions disabled, you can stop testing and report this!
  • [x] it was not happening in the previous stable release
  • [x] it reproduces in insiders builds (get it from here)
  • [x] there is no suspicious output when running from the command line (code `--verbose
[main 9:02:26 PM] args: { _: [],
  help: false,
  h: false,
  version: false,
  v: false,
  wait: false,
  w: false,
  diff: false,
  d: false,
  goto: false,
  g: false,
  'new-window': false,
  n: false,
  'unity-launch': false,
  'reuse-window': false,
  r: false,
  performance: false,
  p: false,
  'prof-startup': false,
  verbose: true,
  logExtensionHostCommunication: false,
  'disable-extensions': false,
  disableExtensions: false,
  'list-extensions': false,
  'show-versions': false,
  nolazy: false }
[main 9:02:27 PM] IPC#vscode-machineId
[main 9:02:27 PM] IPC#vscode-workbenchLoaded
  • [x] there is no suspicious output in the window itself (Help | Toggle Developer Tools | Console)
messageService.ts:125Extension host terminated unexpectedly. Please reload the window to recover.
e.doShow @ messageService.ts:125
extensionHost.ts:324Extension host terminated unexpectedly. Code:  3221225477  Signal:  null
d.onExit @ extensionHost.ts:324
  • [ ] it reproduces on Windows, Linux and Mac - COMMENT: only tried on Windows 10
  • [x] it reproduces after deleting /User/keybindings.json and /User/settings.json (backup first! see below for paths)
  • [x] it reproduces when opening empty (code -n from the command line)
  • [x] it reproduces opening any folder
  • [x] it reproduces opening any file
  • [x] it reproduces when only having a single window open
  • [x] it reproduces by just using Code without external tools running on the same folder
  • [x] it reproduces from a workspace that is not under Git version control
  • [x] it reproduces independently if a file is opened or not after startup
  • [x] it reproduces when running with GPU disabled (code --disable-gpu)
  • [x] it reproduces when being offline
  • [x] it reproduces when disabling the file watching (set files.watcherExclude to "/": true)
  • [x] it reproduces after uninstalling and reinstalling
  • [x] it reproduces after deleting the application data directory (backup first! see below for paths)

  • [ ] I have not played around with permissions or ran Code as administrator - COMMENT: ran as admin after non-admin user not working, admin user works without issue

  • [ ] I am seeing a single CPU process spin high (please share the full command line arguments) - COMMENT: not seeing high cpu process
  • [ ] I am seeing Code consuming lots of memory in a short time - COMMENT: Code not consuming lots of memory

Removing packages.json in C:\Program Files (x86)\Microsoft VS Code Insiders\resources\app\extensions\git causes the error to go away, but this can't be the right solution? Strangely, putting "git.enabled": false in settings did not fix the error.

These other apps are installed: Nodejs v6.10.3, npm 5.0.3, git version 2.13.0 (64 bit)

I upgrade to v1.13.0 also has the issue.

I try deleted D:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\git folder. , then this issue has resolved. My god.

suggestion: The mechanism of using the plugin is independent of each other, and the plugin does not affect each other.

so I think the --disable-extensions argument does not work.

@bpasero see Find the logic of git. If git does not install to C drive , then can not get the path to git.exe. Now has no problem when I start vscode.exe, but if I press F5 debugging node.js procedures, there will be this problem.

git_error
why not find the path to git.exe from system- environment-variables ?

Ouch...Thanks for you! @netcore-jroger I deleted this folder. The error has been repaired.

This also worked for me. Thank you very much! (using Insiders edition)

In fact, the root cause of my problem is that the environmental variables of the system are contaminated. Please check here for specific reasons nodejs/help#728
However, a Libuv of bug was also discovered.
@bpasero @joaomoreno

Still getting the error on PHP files. Any idea?

UPDATE: Looks like I just needed to make sure that the user environment variable path does not include any path with quotes "" or semicolons ;. That fixed everything for me.

For me, this seems to be an issue with getting the git path for non-admin Windows user. Here's what happens for me on Windows 10.

Scenario 1: git path set in non-admin user environment variable

  • running VS code as non-admin user - extension host error
  • running VS code as admin user - no error, but no git

Scenario 2: git path set in admin user environment variable

  • running VS code as non-admin user results in extension host error
  • running VS code as admin user - no error, and git works

Scenario 3: git path set as system environment variable

  • running VS code as non-admin user - no error
  • running VS code as admin user - no error

Seems like VS code has problems reading non-admin user environment variables? In a non-admin user account, running "git --version" returns the valid version when the git path is set on the non-admin user, but seems like maybe something to do with this git logic here?

Also, adding git.path in settings file does not work, presumably because the error from the git logic above still causes the extension host error?

I don't know if this will help someone but I decided to uninstalled and reinstalled vs code 1.15.1 stable. Still got the same error, then I decided to install vs code insider version instead of the stable version and still got the same error. I disable all the extensions and went through them one by one. Until I came upon extension Typescript Hero. I reloaded this extension and got the error. I uninstalled it and have not have that error sense. Then it pop up again and I notice in the developer tool that there was a lot of conflict between all the extensions I installed. So I went through and started removing all the ones that were conflicting with each other. I think that with vs code it is best to stick with the bare minimum of extensions needed for your project..

@netcore-jroger Very very thsnk you for answer 馃憤

I try deleted D:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\git folder. , then this issue has resolved. My god.

Had same issue for PHP files, by setting below values in user settings solved the error pop up.
"php.suggest.basic": false,
"php.validate.enable": false

I had the same problem with a clean installation, the solution working for me was proposed by @netcore-jroger. Thank you so much.
(I am using the last version 1.17 and windows 10)

https://github.com/Microsoft/vscode/issues/26628#issuecomment-307709404

I'm not sure if this is what caused the error for me (regarding extension host terminated not going away) I had an incorrect settings line in JSON pertaining to python linting. I couldn't even load a theme. I turned off the php suggest/validate as @meraj-shaikh mentioned, that worked for me, but I also removed that python linting line that I added at some point. After I removed that line I was able to set my theme again.

Prior to this I deleted the extensions folder under .vscode but it kept coming back even after uninstall on Windows 10.

Was this page helpful?
0 / 5 - 0 ratings