Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upExtension host terminated unexpectedly on VSCode 1.26.0 #380
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
codingdracula
commented
Aug 13, 2018
•
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hbergren
Aug 13, 2018
Update: I can also reproduce the error in a normal non-multi-root VS Code workspace, with just a single directory.
hbergren
commented
Aug 13, 2018
|
Update: I can also reproduce the error in a normal non-multi-root VS Code workspace, with just a single directory. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 13, 2018
Collaborator
Ok. I have not upgraded to 1.26.0 yet. I'll try and get to this tonight or tomorrow AM.
|
Ok. I have not upgraded to 1.26.0 yet. I'll try and get to this tonight or tomorrow AM. |
wingrunr21
changed the title from
Extension host terminated unexpectedly
to
Extension host terminated unexpectedly on VSCode 1.26.0
Aug 13, 2018
wingrunr21
self-assigned this
Aug 13, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
darren987469
commented
Aug 14, 2018
|
I have the same problem when upgrading to 1.26.0 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 14, 2018
Collaborator
Ok, so far I've traced this to be occurring in the legacy linter code. If you completely disable linting in the extension settings it appears to keep the extension host from crashing. I'm going to keep digging but that at least should allow you to edit Ruby files for the time being.
Edit:
This appears to be an Electron bug (electron/electron#13254 and electron/electron#13679). It was not present in Electron v1.7.x (eg VSCode <= 1.25.0) but is present in Electron v1.8.x and higher (and VSCode 1.26.0 is on Electron 2.0.5). Looking into mitigation on it.
|
Ok, so far I've traced this to be occurring in the legacy linter code. If you completely disable linting in the extension settings it appears to keep the extension host from crashing. I'm going to keep digging but that at least should allow you to edit Ruby files for the time being. Edit: This appears to be an Electron bug (electron/electron#13254 and electron/electron#13679). It was not present in Electron v1.7.x (eg VSCode <= 1.25.0) but is present in Electron v1.8.x and higher (and VSCode 1.26.0 is on Electron 2.0.5). Looking into mitigation on it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
TonyCTHsu
commented
Aug 14, 2018
|
Yeah, experiencing the same problem after upgrade to 1.26. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hbergren
Aug 14, 2018
Ok, so far I've traced this to be occurring in the legacy linter code. If you completely disable linting in the extension settings it appears to keep the extension host from crashing. I'm going to keep digging but that at least should allow you to edit Ruby files for the time being.
Thanks for the quick response and workaround!
hbergren
commented
Aug 14, 2018
Thanks for the quick response and workaround! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 14, 2018
Collaborator
TL;DR: Open VSCode via the code command line so it inherits your shell environment correctly OR set the paths to bundler/your linters to absolute paths.
This seems to be a combination of the previously mentioned Electron bug + the underlying problems this extension has with correctly detecting Ruby environments. The Electron bug gets triggered when the command that is passed to spawn can't be found in the VSCode environment. I solved this locally by both loading VSCode from my workspace directory (so that the proper shell variables are loaded) and by setting user/workspace settings to absolute paths for bundler/linters. This is a temp workaround for folks while I work to correctly detect the Ruby environment (which is work I was doing anyway for the language server).
@hbergren I don't have a good solution for your multi-root workspace right now. I'm very sorry. Multi-root workspace support is literally next on my list of support for the language server and I haven't gotten it done yet. For the time being the best I can say is you'll need to open a different editor instance for each root. I realize that sucks.
|
TL;DR: Open VSCode via the This seems to be a combination of the previously mentioned Electron bug + the underlying problems this extension has with correctly detecting Ruby environments. The Electron bug gets triggered when the command that is passed to spawn can't be found in the VSCode environment. I solved this locally by both loading VSCode from my workspace directory (so that the proper shell variables are loaded) and by setting user/workspace settings to absolute paths for bundler/linters. This is a temp workaround for folks while I work to correctly detect the Ruby environment (which is work I was doing anyway for the language server). @hbergren I don't have a good solution for your multi-root workspace right now. I'm very sorry. Multi-root workspace support is literally next on my list of support for the language server and I haven't gotten it done yet. For the time being the best I can say is you'll need to open a different editor instance for each root. I realize that sucks. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 14, 2018
Collaborator
I have to head to work but will continue to work on this tonight. I hope the workarounds I posted can get people through the day. If anyone else wants to take a look today here's where I am:
The specific Electron bug is triggered here. When the command is not found the file descriptor is invalid and attempting to end the stream causes the SIGPIPE. The problem is that particular attribute is still a Socket on the ChildProcess instance. We may be able to look at some attributes there to check if it is a valid Socket. I hadn't gotten there yet this morning.
|
I have to head to work but will continue to work on this tonight. I hope the workarounds I posted can get people through the day. If anyone else wants to take a look today here's where I am: The specific Electron bug is triggered here. When the command is not found the file descriptor is invalid and attempting to end the stream causes the |
gerrywastaken
referenced this issue
Aug 14, 2018
Closed
Extension Host terminated unexpectedly #56301
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
codingdracula
Aug 14, 2018
The bug seems to be a problem specifically with 1.26.0
For anyone looking for a work around so they can keep working, the previous version of vscode is available here: https://code.visualstudio.com/updates/v1_25
Don't forget to add, "update.channel": "none", to your user settings file.
Settings Sync package is super helpful in this case: https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
@wingrunr21 also gave some work around solutions if you want to stick with 1.26.0. For me, it seemed easier to downgrade for the time being since I didn't have any major issues with 1.25
codingdracula
commented
Aug 14, 2018
•
|
The bug seems to be a problem specifically with 1.26.0 For anyone looking for a work around so they can keep working, the previous version of vscode is available here: https://code.visualstudio.com/updates/v1_25 Don't forget to add, Settings Sync package is super helpful in this case: https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync @wingrunr21 also gave some work around solutions if you want to stick with 1.26.0. For me, it seemed easier to downgrade for the time being since I didn't have any major issues with 1.25 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 14, 2018
Collaborator
@codingdracula You can continue to use the extension in 1.26.0. I posted several different workarounds for that while I work to properly mitigate it.
|
@codingdracula You can continue to use the extension in 1.26.0. I posted several different workarounds for that while I work to properly mitigate it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
gerrywastaken
Aug 15, 2018
@wingrunr21 The work around of running code . didn't work for me and that's what I've always used anyway. I agree with @codingdracula that it's probably easier to just downgrade.
gerrywastaken
commented
Aug 15, 2018
•
|
@wingrunr21 The work around of running |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 15, 2018
Collaborator
@gerrywastaken it depends on your configuration settings. It all hinges in whether the VSCode spawn command can successfully execute the linter.
|
@gerrywastaken it depends on your configuration settings. It all hinges in whether the VSCode |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
gerrywastaken
Aug 15, 2018
@wingrunr21 Yeah but without debug info I can't figure out which linter it's breaking on or why without a lot of trial and error.
edit: ok so I did the trial and error approach of removing linters till I found out which ones broke things.
gerrywastaken
commented
Aug 15, 2018
•
|
@wingrunr21 Yeah but without debug info I can't figure out which linter it's breaking on or why without a lot of trial and error. edit: ok so I did the trial and error approach of removing linters till I found out which ones broke things. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 15, 2018
Collaborator
@gerrywastaken noted it could be better but you can also look at your linter config and the PATH within process.env of VSCode and determine whether or not the linters are going to be found in that PATH. Would you mind posting your config (both linter and bundler) + if the linters are vendored in your bundle or globally installed?
The recommended fix for this upstream is to verify that the linter command being executed is an absolute path. I'm considering either that or doing a command -v check prior to linter execution on POSIX systems and bailing if that fails. Does anyone have a preference? The former solution means linters won't work unless they are configured to be absolute paths.
|
@gerrywastaken noted it could be better but you can also look at your linter config and the The recommended fix for this upstream is to verify that the linter command being executed is an absolute path. I'm considering either that or doing a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
darren987469
Aug 15, 2018
@wingrunr21 If I have different versions of rubocop for different projects, how can I set it in the absolute paths way?
darren987469
commented
Aug 15, 2018
|
@wingrunr21 If I have different versions of rubocop for different projects, how can I set it in the absolute paths way? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hbergren
Aug 15, 2018
@darren987469 , you could use VS Code workspace-specific settings.
Those would get saved in .vscode/ of the root directory of each workspace, or the .code-workspace file if using a multi-root workspace.
hbergren
commented
Aug 15, 2018
|
@darren987469 , you could use VS Code workspace-specific settings. Those would get saved in |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 15, 2018
Collaborator
Yes that’s the solution until I get the multi root support in place.
Also this is a short term mitigation solution. I do intend to fix it properly but want to get a patch release out.
|
Yes that’s the solution until I get the multi root support in place. Also this is a short term mitigation solution. I do intend to fix it properly but want to get a patch release out. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 15, 2018
Collaborator
note that a discussion is going on over in the VSCode repo around this as several extensions are affected:
|
note that a discussion is going on over in the VSCode repo around this as several extensions are affected: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
gerrywastaken
Aug 16, 2018
Would you mind posting your config (both linter and bundler) + if the linters are vendored in your bundle or globally installed?
Basically I just had specified a linter that didn't exist on my system at all. Insead of doing command -v wouldn't which <linter> || where <linter> work better?
edit: NM... I understand now: https://stackoverflow.com/a/677212
gerrywastaken
commented
Aug 16, 2018
•
Basically I just had specified a linter that didn't exist on my system at all. Insead of doing edit: NM... I understand now: https://stackoverflow.com/a/677212 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wingrunr21
Aug 16, 2018
Collaborator
Hi everyone,
Thanks for your patience. Microsoft is going to push v1.26.1 which should handle the SIGPIPE issue in the VSCode Extension Host itself.
|
Hi everyone, Thanks for your patience. Microsoft is going to push v1.26.1 which should handle the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewmcodes
Sep 14, 2018
Anyone still experiencing this issue? I have not seen this issue since the latest updates to VS Code and feel like we could close this issue.
andrewmcodes
commented
Sep 14, 2018
|
Anyone still experiencing this issue? I have not seen this issue since the latest updates to VS Code and feel like we could close this issue. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Jesterovskiy
commented
Sep 15, 2018
•
|
Agree, from the last update - everything is fine |

hbergren commentedAug 13, 2018
Your environment
vscode-rubyversion:0.20.0ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-darwin17]ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]rbenv 1.1.11.26.0Mac OS X 10.13.5 (17F77)Expected behavior
Things just keep working as expected.
Actual behavior
After upgrading VS Code to 1.26.0, I receive an
Extension host terminated unexpectedly.error message after opening a Ruby file in VS Code.It appears to start running the
Indexing ruby source files..., as I see that in the toolbar right before it crashes.I already tried disabling the Solargraph extension in case this extension was colliding with the Solargraph extension somehow, but that still resulted in the same error message.
Extension Service log: