glenn2223 / vscode-live-sass-compiler

Compile Sass or Scss file to CSS at realtime with live browser reload feature.
https://glenn2223.github.io/vscode-live-sass-compiler/
MIT License
355 stars 23 forks source link

Unhandled error when path is not found - (Renamed from command fail) #57

Closed Wolk9 closed 3 years ago

Wolk9 commented 3 years ago

After Updating VSC to version 1.55.0 the Live compiler stays at 'Working on it...' and gives the error: "Running the contributed command: 'liveSass.command.watchMySass' failed."

Version: 1.55.0 Commit: c185983a683d14c396952dd432459097bc7f757f Date: 2021-03-30T16:01:05.981Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 20.3.0

glenn2223 commented 3 years ago

Sorry to hear about this.

What version of the extension are you using?

In the bottom right corner, did you see something similar to either of the below images? Collapsed example error popup that is shown by Live SASS Compiler Expanded example error popup that is shown by Live SASS Compiler

If so, please press F1 and type liveSass.command.createIssue. This will copy the error info to your clipboard and try to open a new browser tab. Ignore the open window prompt and instead paste it into a new comment here.


Alternatively, in your settings, add/change liveSassCompile.settings.showOutputWindowOn to "Trace".

then, try the command again and paste the output here.

Thank you

Wolk9 commented 3 years ago

What version of the extension are you using?

I use the latest version v5.0.0

Wolk9 commented 3 years ago

`### UNEXPECTED ERROR

Machine & Versions Item Value
VS Code v1.55.0
Platform darwin x64
Node 12.18.3 (85)
Live Sass 5.0.0
Installed Extensions
- vscode.configuration-editing (1.0.0)
- vscode.css-language-features (1.0.0)
- vscode.debug-auto-launch (1.0.0)
- vscode.emmet (1.0.0)
- vscode.git (1.0.0)
- vscode.github (0.0.1)
- vscode.github-authentication (0.0.1)
- vscode.html-language-features (1.0.0)
- vscode.json-language-features (1.0.0)
- vscode.merge-conflict (1.0.0)
- vscode.microsoft-authentication (0.0.1)
- ms-vscode.js-debug (1.55.1)
- vscode.testing-editor-contributions (1.0.0)
- vscode.typescript-language-features (1.0.0)
- alefragnani.Bookmarks (13.0.4)
- christian-kohler.path-intellisense (2.3.0)
- CoenraadS.bracket-pair-colorizer-2 (0.2.0)
- donjayamanne.githistory (0.6.16)
- eamodio.gitlens (11.3.0)
- Equinusocio.vsc-material-theme (33.2.0)
- equinusocio.vsc-material-theme-icons (1.2.2)
- esbenp.prettier-vscode (6.3.2)
- formulahendry.auto-rename-tag (0.1.6)
- formulahendry.terminal (0.0.10)
- glenn2223.live-sass (5.0.0)
- Gruntfuggly.todo-tree (0.0.209)
- HookyQR.beautify (1.5.0)
- jgclark.vscode-todo-highlight (2.0.1)
- lihui.vs-color-picker (1.0.0)
- mhutchie.git-graph (1.30.0)
- mkaufman.HTMLHint (0.10.0)
- mrmlnc.vscode-scss (0.9.0)
- naumovs.color-highlight (2.3.0)
- oderwat.indent-rainbow (7.5.0)
- PKief.material-icon-theme (4.6.0)
- ritwickdey.LiveServer (5.6.1)
- stylelint.vscode-stylelint (0.86.0)
- tombonnike.vscode-status-bar-format-toggle (2.0.0)
- Zignd.html-css-class-completion (1.20.0)

LOG:

{
"NO LOG": "PLEASE SPECIFY YOUR ISSUE BELOW"
}

=======================

`

glenn2223 commented 3 years ago

My original comment got lost (somehow??), re-adding


Sorry to hear this. I wasn't able to replicate it, in Windows, so more info is required.

What version of the extension are you running?

If you saw a Live SASS Compiler error (like the screengrabs at the bottom):

  1. Run the command liveSass.command.createIssue This will save some error info to the clipboard and try to open a URL
  2. Ignore the open URL prompt
  3. Instead, paste the info here

If not:

  1. Set liveSassCompile.settings.showOutputWindowOn to "Trace"
  2. Try the command again
  3. Paste the output here

image

image

glenn2223 commented 3 years ago

`### UNEXPECTED ERROR

Thank you, it doesn't seem to have retained the error info. Could you please try the second suggestion?

Wolk9 commented 3 years ago

UNEXPECTED ERROR

Machine & Versions Item Value
VS Code v1.55.0
Platform darwin x64
Node 12.18.3 (85)
Live Sass 5.0.0
Installed Extensions
- vscode.configuration-editing (1.0.0)
- vscode.css-language-features (1.0.0)
- vscode.debug-auto-launch (1.0.0)
- vscode.emmet (1.0.0)
- vscode.git (1.0.0)
- vscode.github (0.0.1)
- vscode.github-authentication (0.0.1)
- vscode.html-language-features (1.0.0)
- vscode.json-language-features (1.0.0)
- vscode.merge-conflict (1.0.0)
- vscode.microsoft-authentication (0.0.1)
- ms-vscode.js-debug (1.55.1)
- vscode.testing-editor-contributions (1.0.0)
- vscode.typescript-language-features (1.0.0)
- alefragnani.Bookmarks (13.0.4)
- christian-kohler.path-intellisense (2.3.0)
- CoenraadS.bracket-pair-colorizer-2 (0.2.0)
- donjayamanne.githistory (0.6.16)
- eamodio.gitlens (11.3.0)
- Equinusocio.vsc-material-theme (33.2.0)
- equinusocio.vsc-material-theme-icons (1.2.2)
- esbenp.prettier-vscode (6.3.2)
- formulahendry.auto-rename-tag (0.1.6)
- formulahendry.terminal (0.0.10)
- glenn2223.live-sass (5.0.0)
- Gruntfuggly.todo-tree (0.0.209)
- HookyQR.beautify (1.5.0)
- jgclark.vscode-todo-highlight (2.0.1)
- lihui.vs-color-picker (1.0.0)
- mhutchie.git-graph (1.30.0)
- mkaufman.HTMLHint (0.10.0)
- mrmlnc.vscode-scss (0.9.0)
- naumovs.color-highlight (2.3.0)
- oderwat.indent-rainbow (7.5.0)
- PKief.material-icon-theme (4.6.0)
- ritwickdey.LiveServer (5.6.1)
- stylelint.vscode-stylelint (0.86.0)
- tombonnike.vscode-status-bar-format-toggle (2.0.0)
- Zignd.html-css-class-completion (1.20.0)

LOG:

{
"NO LOG": "PLEASE SPECIFY YOUR ISSUE BELOW"
}

=======================

Wolk9 commented 3 years ago

"liveSassCompile.settings.showOutputWindowOn": "Trace"

glenn2223 commented 3 years ago

"liveSassCompile.settings.showOutputWindowOn": "Trace"

Sorry, if I wasn't clear before. That needs adding to your settings.json file or your workspace folder settings (this file has the extension .code-workspace).

Then try running the liveSass.command.watchMySass command again. This will show a output window at the bottom (like the screengrab below). Copy that info here

image

Wolk9 commented 3 years ago

"liveSassCompile.settings.showOutputWindowOn": "Trace"

Sorry, if I wasn't clear before. That needs adding to your settings.json file or your workspace folder settings (this file has the extension .code-workspace).

Then try running the liveSass.command.watchMySass command again. This will show a output window at the bottom (like the screengrab below). Copy that info here

image

No no, I just copied the JSON code here. I did change the LiveSassCompile.settings.showOutputWindowsOn to trace in the settings.

Hang on.. I will restart my VSC again. Seems that the error isn't comming up again.

Wolk9 commented 3 years ago
Command called: "liveSass.command.watchMySass"
--------------------
Switching UI state
--------------------
Changing status bar to: Watching
--------------------
Watching...
--------------------
VS Code event: "onDidSaveTextDocument"
--------------------
SASS file saved
A SASS file has been saved, starting checks
--------------------
Checking SASS path isn't excluded
Path: /Users/treffers/Documents/WINC opleiding/Winc_Academy/Slak_Test/style.scss
--------------------
Checking all workspace folders in project
--------------------
Checking folder 1 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Searching folder
--------------------
Checking folder 2 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Searching folder
--------------------
Getting SASS files
Query pattern: **/[^_]*.s[a|c]ss
Can be overwritten: true
--------------------
Checking folder 1 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Checking folder 2 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Wolk9 commented 3 years ago

But this happens after I have set the ShowOutputWindowOn to Trace. After that issuing LiveSass Watch Sass, then in the bar it says 'Watching..." while it is initial saying: 'Working on that' and gives the error in the topic of this very thread.

glenn2223 commented 3 years ago

And did an error like the below show up in the bottom corner?

Collapsed example error popup that is shown by Live SASS Compiler

Wolk9 commented 3 years ago

And did an error like the below show up in the bottom corner?

Collapsed example error popup that is shown by Live SASS Compiler

Yes, but then with the message: Running the contributed command: 'liveSass.command.watchMySass' failed. #57

Wolk9 commented 3 years ago

I have now restarted VSC code with the 'trace' option on. It loads with the following information output:

"live-sass-compiler" is now activate
--------------------
Constructing app model
--------------------
Constructing error logger
--------------------
Clearing any old log data
--------------------
Error logs cleared
--------------------
Changing status bar to: "Starting..."
--------------------
App model constructed
--------------------
Checking for an unread announcement
--------------------
Live SASS commands ready
Commands have been saved and are ready to be used
--------------------
Announcement has already been shown
--------------------
Changing status bar to: Not watching (or Watch SASS)
--------------------

Then I click on 'Watch Sass' in the toolbar and this appears:

Schermafbeelding 2021-04-06 om 11 53 24
glenn2223 commented 3 years ago

Ahh okay, I wanted to start with "Unhandled error with Live Sass Compiler. Error message:". It's this that means the error information has been saved for me to debug.

Can you try installing the below version:
live-sass-5.0.0-rc.4.1.zip

To install it you: unzipping the folder then drag the .vsix file into the "Extensions" tab of VS Code

Wolk9 commented 3 years ago

Done.

Gives the same error. Keeps staying on 'Working on it...'

glenn2223 commented 3 years ago

So I can see why the error wasn't reportng as I expected.

Please try the below:
live-sass-5.0.0-rc.4.2.zip

This will not resolve the issue, but it should show the error message I wanted ("Unhandled error with Live Sass Compiler. Error message:")

If it does, can you (as you did before):

  1. Run the command liveSass.command.createIssue
  2. This will save some error info to the clipboard and try to open a URL
  3. Ignore the open URL prompt
  4. Instead, paste the info here
Wolk9 commented 3 years ago

Done.

Have to disappoint you. Still the failed error and 'Working on it...'

glenn2223 commented 3 years ago

Sorry I left off the new zip file

Did you install live-sass-5.0.0-rc.4.2.zip?

Wolk9 commented 3 years ago

Yes I did install rc.4.2

glenn2223 commented 3 years ago

Sorry for the delay, been frazzling my mind as to why the error wasn't being caught. Turned out I'd applied the error catcher to only one function and not the other 🤦‍♂️

Please can you try again for the below:
live-sass-5.0.0-rc.4.3.zip

Hopefully this time I will get usable error info 🤞

Wolk9 commented 3 years ago

No probs. I was having lunch break. I wil give it a try now. Hang on.

Wolk9 commented 3 years ago

rc4.3 installed and run.

Have to disappoint you again. Still the failed error.

This is the output:

"live-sass-compiler" is now activate
--------------------
Constructing app model
--------------------
Constructing error logger
--------------------
Clearing any old log data
--------------------
Error logs cleared
--------------------
Changing status bar to: "Starting..."
--------------------
App model constructed
--------------------
Checking for an unread announcement
--------------------
Live SASS commands ready
Commands have been saved and are ready to be used
--------------------
Announcement has already been shown
--------------------
Changing status bar to: Not watching (or Watch SASS)
--------------------
Command called: "liveSass.command.watchMySass"
--------------------
Starting to compile all files
--------------------
Changing status bar to: "Working on it..."
--------------------
Getting SASS files
Query pattern: **/[^_]*.s[a|c]ss
Can be overwritten: true
--------------------
Checking folder 1 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Checking folder 2 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Getting SASS files
Query pattern: **/[^_]*.s[a|c]ss
Can be overwritten: true
--------------------
Checking folder 1 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Checking folder 2 of 2
Folder: [object Object]
--------------------
No base folder override found. Keeping workspace folder
--------------------
Wolk9 commented 3 years ago

and

UNEXPECTED ERROR

Machine & Versions Item Value
VS Code v1.55.0
Platform darwin x64
Node 12.18.3 (85)
Live Sass 5.0.0
Installed Extensions
- vscode.configuration-editing (1.0.0)
- vscode.css-language-features (1.0.0)
- vscode.debug-auto-launch (1.0.0)
- vscode.emmet (1.0.0)
- vscode.git (1.0.0)
- vscode.github (0.0.1)
- vscode.github-authentication (0.0.1)
- vscode.html-language-features (1.0.0)
- vscode.json-language-features (1.0.0)
- vscode.merge-conflict (1.0.0)
- vscode.microsoft-authentication (0.0.1)
- ms-vscode.js-debug (1.55.1)
- vscode.testing-editor-contributions (1.0.0)
- vscode.typescript-language-features (1.0.0)
- alefragnani.Bookmarks (13.0.4)
- christian-kohler.path-intellisense (2.3.0)
- CoenraadS.bracket-pair-colorizer-2 (0.2.0)
- donjayamanne.githistory (0.6.16)
- eamodio.gitlens (11.3.0)
- Equinusocio.vsc-material-theme (33.2.0)
- equinusocio.vsc-material-theme-icons (1.2.2)
- esbenp.prettier-vscode (6.3.2)
- formulahendry.auto-rename-tag (0.1.6)
- formulahendry.terminal (0.0.10)
- glenn2223.live-sass (5.0.0)
- Gruntfuggly.todo-tree (0.0.209)
- HookyQR.beautify (1.5.0)
- jgclark.vscode-todo-highlight (2.0.1)
- lihui.vs-color-picker (1.0.0)
- mhutchie.git-graph (1.30.0)
- mkaufman.HTMLHint (0.10.0)
- mrmlnc.vscode-scss (0.9.0)
- naumovs.color-highlight (2.3.0)
- oderwat.indent-rainbow (7.5.0)
- PKief.material-icon-theme (4.6.0)
- ritwickdey.LiveServer (5.6.1)
- stylelint.vscode-stylelint (0.86.0)
- tombonnike.vscode-status-bar-format-toggle (2.0.0)
- Zignd.html-css-class-completion (1.20.0)

LOG:

{
"NO LOG": "PLEASE SPECIFY YOUR ISSUE BELOW"
}

=======================

glenn2223 commented 3 years ago

Are you sure you have installed rc4.3? I only ask because the Checking folder # of # should read as below

--------------------
Checking folder 1 of 1
Folder: Sass Sample // <- this is the folder name (Not [object Object])
--------------------
glenn2223 commented 3 years ago

Thanks for that extra info as well. I can see you haven't installed it. Can you take a screengrab of the "Extensions" tab?

Yours is glenn2223.live-sass (5.0.0) and it should be glenn2223.live-sass (5.0.0-rc.4.3)

Wolk9 commented 3 years ago

Ah... you rang a bell.... I checked and indeed it wasn't installed. Possible I clicked on "update to 5.0.0" and downgraded with that.

Uninstalled the complete extention, then installed rc4.3. Now the screen shows:

Schermafbeelding 2021-04-06 om 14 09 59
Wolk9 commented 3 years ago

UNEXPECTED ERROR

Machine & Versions Item Value
VS Code v1.55.0
Platform darwin x64
Node 12.18.3 (85)
Live Sass 5.0.0-rc.4.3
Installed Extensions
- vscode.css-language-features (1.0.0)
- vscode.debug-auto-launch (1.0.0)
- vscode.emmet (1.0.0)
- vscode.git (1.0.0)
- vscode.github (0.0.1)
- vscode.github-authentication (0.0.1)
- vscode.html-language-features (1.0.0)
- vscode.merge-conflict (1.0.0)
- vscode.microsoft-authentication (0.0.1)
- ms-vscode.js-debug (1.55.1)
- vscode.testing-editor-contributions (1.0.0)
- alefragnani.Bookmarks (13.0.4)
- christian-kohler.path-intellisense (2.3.0)
- CoenraadS.bracket-pair-colorizer-2 (0.2.0)
- donjayamanne.githistory (0.6.16)
- eamodio.gitlens (11.3.0)
- Equinusocio.vsc-material-theme (33.2.0)
- equinusocio.vsc-material-theme-icons (1.2.2)
- esbenp.prettier-vscode (6.3.2)
- formulahendry.auto-rename-tag (0.1.6)
- formulahendry.terminal (0.0.10)
- glenn2223.live-sass (5.0.0-rc.4.3)
- Gruntfuggly.todo-tree (0.0.209)
- HookyQR.beautify (1.5.0)
- jgclark.vscode-todo-highlight (2.0.1)
- lihui.vs-color-picker (1.0.0)
- mhutchie.git-graph (1.30.0)
- mkaufman.HTMLHint (0.10.0)
- mrmlnc.vscode-scss (0.9.0)
- naumovs.color-highlight (2.3.0)
- oderwat.indent-rainbow (7.5.0)
- PKief.material-icon-theme (4.6.0)
- ritwickdey.LiveServer (5.6.1)
- stylelint.vscode-stylelint (0.86.0)
- tombonnike.vscode-status-bar-format-toggle (2.0.0)
- Zignd.html-css-class-completion (1.20.0)

LOG: 2021-04-06 12:09:42.200Z

{
    "createdAt": "2021-04-06T12:09:42.200Z",
    "event": {
        "files": "Error lies in getSassFiles()",
        "error": {
            "stack": "Error: ENOENT: no such file or directory, scandir '/Volumes/config'",
            "message": "ENOENT: no such file or directory, scandir '/Volumes/config'",
            "errno": -2,
            "code": "ENOENT",
            "syscall": "scandir",
            "path": "/Volumes/config"
        }
    }
}

=======================

Wolk9 commented 3 years ago

Seeing this log myself I have a clue:

The 'config' workspace is residing on my RP4i with Home Assistant running on it. But once this Samba server is somehow disconnected, the mappings to those directories are not available anymore. And it appears that this extension wants them to be real, dispite the fact that they have no tie with the Sass/scss files I would like to live-compile. Maybe this should be addressed in a next RFC.

It would be nice to be able to exclude 'probed' directories.

glenn2223 commented 3 years ago

Can you take a screengrab of the file structure or make a copy here if you can't? Something like:

- Folder
  - Volumes
    - config
      - somefile.config
  - Sass
    - style.scss

Just so I can try and tackle this. Thanks

Wolk9 commented 3 years ago
Schermafbeelding 2021-04-06 om 14 32 41
glenn2223 commented 3 years ago

So the config folder (highlighted in blue) path is /Volumes/config. It also doesn't have any SASS files and is it the one that can disconnect?

Wolk9 commented 3 years ago

So the config folder (highlighted in blue) path is /Volumes/config. It also doesn't have any SASS files and is it the one that can disconnect?

Correct .

glenn2223 commented 3 years ago

So fdir allows you to suppress errors, which it claims to do by default (obviously not 😁)

Can you test this one, which should suppress the error: live-sass-5.0.0-rc.4.4.zip

If this works then I can get v5 released tonight.
FYI: Problems with publishing to VS Code's marketplace means that I really don't want to (well, can't) publish any more RC's (Ref #54)

Wolk9 commented 3 years ago

Flawless!!

You're the best!

Glad I could contribute to this release.

glenn2223 commented 3 years ago

Good, I'm glad it works. v5 here we come 🎉

Thanks for your help in debugging this.

Wolk9 commented 3 years ago

I will close this issue now.