-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watch causes VS Code to crash. #312
Comments
@cwoolum Thanks for submitting a ticket! Can you debug some of the file names and see if those existing on the host or client machine? /**
* Takes files and converts to data strings for coverage consumption
* @param files files that are to turned into data strings
*/
public async loadDataFiles(files: Set<string>): Promise<Map<string, string>> {
// Load the files and convert into data strings
const dataFiles = new Map<string, string>();
for (const file of files) {
dataFiles.set(file, await this.load(file));
}
return dataFiles;
}
private load(path: string) {
return new Promise<string>((resolve, reject) => {
readFile(path, (err, data) => {
if (err) { return reject(err); }
return resolve(data.toString());
});
});
} You may be able to fix this by using the manual coverage file paths feature to provide the exact file path 🤔
|
Hey @ryanluker, All of the files are on the client machine. The extension is able to resolve them and I can log the content of them but for some reason nothing seems to happen after |
This is also happening to me, only I have everything local. No remote files involved. In my case, I have a multi-root setup. Each workspace folder can have its own |
@Jason3S thanks for the extra info! can you confirm you are able to use the example projects workspace / multi-root setup? You might need to define a default folder or some other tweak for it to work 🤔. |
I've noticed this issue occur when using WSL2 in the last few weeks. Eventually, it seems like the whole plugin platform crashes.: Angular, ESLint, etc., plugins all have to reload. Hasn't been an issue previously, but I've no clue what's changed. |
VS Code has been very unstable over the past few weeks. By default, I don't have this extension enabled, and I see the same thing. Please open (or add to) and issue against VS Code. |
@Jason3S - VS Code itself has been perfectly stable for me, it's only when I try to run the "Display Coverage" and/or "Watch" command that the entire extensions runner system crashes and all my extensions have to reload. That's definitely a bug with this extension and not VS Code. I've also tried the manual coverage file paths workaround but even when I use the fully qualified path (e.g. |
That sounds like an issue with this extension. I suggest opening a new Issue. This one is a bit stale and might be unrelated. |
@FizzBuzz791 @Jason3S Thanks for the discussion on this ticket! (see comment below on where to find the debug logs) |
Sorry @ryanluker, I think I missed your reply on this one. I opened the Output tab, cleared the logs for "Extension Host (Remote)" and then ran the "Display Coverage" command and this is what I got.
|
@FizzBuzz791 Thanks for those logs, I think we need different ones though 🤔 they should look like the ones below. Do a double check on the output tab that the top right dropdown is showing |
I ran into the same issue when dealing with Cobertura coverage reports. After some debugging, I found an issue in the cobertura-parse npm library. It parses an attribute called
The parsing of this attribute is currently done like so:
Due to the non-integer value of the percentages, the parsing goes wrong. It should however ignore the percentage, and just deal with the
However, the The specs for Cobertura are somewhat lacking (https://github.com/cobertura/web/blob/master/htdocs/xml/coverage-04.dtd), so it is not really a wonder that these things happen. |
Thanks for the investigation! We use a custom fork already of the |
Describe the bug
If I try to use this extension while using a SSH remote connection, VSCode will crash and restart.
To Reproduce
Steps to reproduce the behaviour:
I added some additional logging and it seems that both files are loaded but
loadDataFiles
never seems to return and the next logger line[coverageservice]: Loaded
never gets hit.Expected behaviour
I would expect the code coverage to load correctly.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: