-
Notifications
You must be signed in to change notification settings - Fork 286
Extension host terminated unexpectedly on VSCode 1.26.0 #380
Comments
Update: I can also reproduce the error in a normal non-multi-root VS Code workspace, with just a single directory. |
Ok. I have not upgraded to 1.26.0 yet. I'll try and get to this tonight or tomorrow AM. |
I have the same problem when upgrading to 1.26.0 |
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. |
Yeah, experiencing the same problem after upgrade to 1.26. |
Thanks for the quick response and workaround! |
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. |
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 |
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 |
@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. |
@wingrunr21 The work around of running |
@gerrywastaken it depends on your configuration settings. It all hinges in whether the VSCode |
@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 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 |
@wingrunr21 If I have different versions of rubocop for different projects, how can I set it in the absolute paths way? |
@darren987469 , you could use VS Code workspace-specific settings. Those would get saved in |
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. |
note that a discussion is going on over in the VSCode repo around this as several extensions are affected: |
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 |
Hi everyone, Thanks for your patience. Microsoft is going to push v1.26.1 which should handle the |
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. |
Agree, from the last update - everything is fine |
Your environment
vscode-ruby
version:0.20.0
ruby 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.1
1.26.0
Mac 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:
The text was updated successfully, but these errors were encountered: