vscode-live-sass-compiler icon indicating copy to clipboard operation
vscode-live-sass-compiler copied to clipboard

Always receiving "Extension host terminated unexpectedly"

Open dineiar opened this issue 6 years ago • 53 comments

When I open a workspace in VS Code, even without having any scss file open, I'm receiving the message "Extension host terminated unexpectedly". Details: screenshot from 2018-11-12 12-20-25 When the extension is disabled everything works fine.

I have the Live Server extension installed. This is different from #53 , as I'm receiving the error just by opening VS Code.

Reproduced in 2 versions: VS Code v1.28.0 - commit 431ef9da3cf88a7e164f9d33bf62695e07c6c2a9 VS Code v1.28.2 - commit 7f3ce96ff4729c91352ae6def877e59c561f4850 Environment: Electron: 2.0.9 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: x64

dineiar avatar Nov 12 '18 14:11 dineiar

Same and its all Sass extensions, not just this one. I tried installing node-sass globally, hoping perhaps it was that. It was not.

Abourass avatar Jan 01 '19 16:01 Abourass

I too am having this issue.

Tigerlady avatar Jan 15 '19 18:01 Tigerlady

Same. Seems like it can't handle comments like this:

//@import "plugins/xxx";

at least that's was the problem at my side.

SimonMayerhofer avatar Feb 04 '19 09:02 SimonMayerhofer

also having issues, but only after vs code updated.

ghost avatar Feb 06 '19 22:02 ghost

Same here, after latest vscode update it seems stopping with the same error

samirdjelal avatar Feb 10 '19 17:02 samirdjelal

I'm also experiencing the same problem when using @import.

davidcsida avatar Feb 11 '19 09:02 davidcsida

I'm also experiencing the same problem when using @import.

I found out that crashes only happen while writing @import. If I finish writing the path and restart the extensions, everything works perfectly.

davidcsida avatar Feb 11 '19 09:02 davidcsida

I don't use @import at all but i still get that crash, even that i made my scss empty again to findout if the file is content crashing the ext, but it even crash on empty file. while I changed the priject to find out that it works on some projects

samirdjelal avatar Feb 11 '19 09:02 samirdjelal

In my case the problem was solved by removing "Image Preview" Extension. For some reason it caused live-sass-compiler to generate "Extension host terminated unexpectedly."

yehudaTiram avatar Feb 18 '19 08:02 yehudaTiram

@yehudaTiram It worked for me too. Some code confliction?? I cannot tell which extension causes this error, I've removed 'Image Preview' for the time being.

norixx avatar Feb 19 '19 10:02 norixx

I guess both can't work together.

yehudaTiram avatar Feb 19 '19 15:02 yehudaTiram

This should be resolved with Image Preview 0.17.4. My environment's working correctly again with both enabled.

https://github.com/kisstkondoros/gutter-preview/issues/40

FelesNoctis avatar Feb 21 '19 01:02 FelesNoctis

Is anyone else still having this issue? Every time I start writing @import in my main.scss file it crashes the sass-compiler extension? I don't have the image preview extension installed either... really annoying!

mattgriffiths4 avatar Apr 16 '19 10:04 mattgriffiths4

I now have the same issue. One very similar project is OK, the other crashes. But I absolutely cant make sense of why this is happening at all.

Update: I am no longer able to build my project. It is broken, and no idea why!!!

Update 2: After re-creating my workspace from GIT, the sass-compiler works again. I am unable to figure out why the sass-compiler crashes in one directory, yet compiles in the other.

eteisman avatar May 02 '19 13:05 eteisman

Image Preview

I don't install the "Image preview" extension but still get the same crash error. So I think that's not the common method to fix this issue.

mizhon avatar May 18 '19 12:05 mizhon

My issue was with the Live Sass Compiler... once uninstalled, no longer had the same extension host error

SmithWebDev avatar May 21 '19 15:05 SmithWebDev

Is anyone else still having this issue? Every time I start writing @import in my main.scss file it crashes the sass-compiler extension? I don't have the image preview extension installed either... really annoying!

I can confirm that I've been having this issue again, and only with files with @import. Specifically, in the project I'm working on, these imports work perfectly fine due to the environment configuration (as in, the program in question utilizes them just fine), but that environment is also non-standard. Effectively, the program itself is reading the core SCSS files from one folder and using those import paths as a reference, and then has a different folder outside of that path that actually has the files. VSCode is confused as all hell, but the program knows what its doing.

That being said, obviously it's difficult for Live SASS Compiler, or anybody else for that matter, to adapt to strange environments like that. However I AM surprised that an error catch hasn't been designed yet. LSC shouldn't be so brittle that another extension can kill it.

Also see: https://github.com/sergiirocks/vscode-ext-color-highlight/issues/53

FelesNoctis avatar Jun 09 '19 03:06 FelesNoctis

As an example:

css/bootstrap/_bootstrap.scss css/bootstrap/_bootstrap.scss targeting files within css/bootstrap/bootstrap/ This works entirely as expected within VSCode, no extension issues.

css/bootstrap.scss css/bootstrap.scss targeting files within css/bootstrap/bootstrap/ Explosions, lasers, death, destruction, and the extension host failing.

As above, the second example above works fine within the program itself for various reasons, but VSCode isn't aware of that environment so it has a seizure. And no, I have no idea why the project is set up this way.


This isn't the first time I've run into an issue with another extension making Live SASS Compiler eat itself and take the extension host with it, which, as above, is why I'm surprised there isn't an error catch for this sort of thing implemented. It shouldn't burn the house down for a roach.

FelesNoctis avatar Jun 09 '19 04:06 FelesNoctis

i'm having the same error while the highlight-colors and live-sass-compiler extensions are running, it's kinda annoying since you have deactivate the highlight colors extension if you want to continue using the sass compiler

ErSulba avatar Jul 13 '19 16:07 ErSulba

Same thing here, happes only when using @import...Anyone solved this problem?

PiotrGrzy avatar Jul 18 '19 13:07 PiotrGrzy

I am also having this issue running both live sass compiler and color highlight extensions. I was able to fix this by setting the supported languages for color-highlight to everything except for scss in settings.json

"color-highlight.languages": [ "*", "!scss" ]

airosu avatar Jul 19 '19 19:07 airosu

Apparently solved disablingthe extension and re-enabling it after opening the project.

russmatt avatar Aug 28 '19 11:08 russmatt

I am also having this issue running both live sass compiler and color highlight extensions. I was able to fix this by setting the supported languages for color-highlight to everything except for scss in settings.json

"color-highlight.languages": [ "*", "!scss" ]

Thank you!

ZippoLee12138 avatar Sep 21 '19 14:09 ZippoLee12138

I am also having this issue running both live sass compiler and color highlight extensions. I was able to fix this by setting the supported languages for color-highlight to everything except for scss in settings.json

"color-highlight.languages": [ "*", "!scss" ]

This seems to fix it for me — thanks!

zhaluza avatar Sep 21 '19 19:09 zhaluza

I am also having this issue running both live sass compiler and color highlight extensions. I was able to fix this by setting the supported languages for color-highlight to everything except for scss in settings.json

"color-highlight.languages": [ "*", "!scss" ]

Thank you for this! There's an extension conflict with "color highlight" extension. This addition to settings.json fixed the issue. No more crashes.

SuiYoung avatar Jan 28 '20 18:01 SuiYoung

adding an empty /* */ end of a scss file crashes the extension also.

alimertcakar avatar Feb 25 '20 19:02 alimertcakar

I am also having this issue running both live sass compiler and color highlight extensions. I was able to fix this by setting the supported languages for color-highlight to everything except for scss in settings.json

"color-highlight.languages": [ "*", "!scss" ]

It worked for me superbly.....

sumandeveloping avatar Apr 06 '20 15:04 sumandeveloping

For me, the issue was caused by Live Sass Compiler. If it's same with you, do these:

  1. Reload extension host;
  2. Uninstall LSC;
  3. Reload VS Code;

That should fix the error. If you need something like LSC, do the following:

  1. Install node-sass globally with npm i -g node-sass;
  2. Then run (in watch mode) with node-sass -w --output-style=compressed path/to/file.scss path/to/file.min.css; and it's way faster than LSC in compilation. Note that the watch and output-style flags are optional.

PS: You can add a "sass" prop/key in the "scripts" section of "package.json" and assign it a value of the script to run: node-sass -w --output-style=compressed path/to/file.scss path/to/file.min.css; with that you can then run npm run sass from your project directory to compile your SCSS file(s).

https://www.npmjs.com/package/node-sass#command-line-interface

power-f-GOD avatar Apr 14 '20 08:04 power-f-GOD

I am also having this issue running both live sass compiler and color highlight extensions. I was able to fix this by setting the supported languages for color-highlight to everything except for scss in settings.json

"color-highlight.languages": [ "*", "!scss" ]

Thanks man this seriously made my day, I was googling some solution for hours worked for me!

shubhdevelop avatar May 17 '20 13:05 shubhdevelop

For my "Extension host terminated unexpectedly" , console error says TypeError : cannot read property 'length' of undefined .

This error occurred even after setting “ color-highlight.languages ”: [“ * ”,“! Scss ”] to setting.json.

consoleOfSass sync js

jibaraakira avatar May 31 '20 13:05 jibaraakira