You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Extension host terminated unexpectedly" has been occurring many of the times I startup VSCode (every few days) even while using Live Server v5.6.1, which was supposed to have fixed this issue, per the changelog.
Only by disabling Live Server was I able to stop these from occurring further.
Error Message Shown
This occurs seconds after launching VSCode, even if just launching to open nothing more than a README.md file, like in the case covered by the logs provided further below.
This error is shown in a popup notification prompting you to "Restart Extension Host" and "Open Developer Tools", like shown in the below screenshot.
Related Issues and History of Reoccurrence
I noticed "[NEW] Fixing Extension host terminated unexpectedly *[#431]" in the Changelog for "Version 5.6.1 (17.04.19)". However, even with my having the latest version, v5.6.1 installed, the issue remains and has been occurring for months now.
Beyond that, it seems that this is an issue that keeps reoccurring, with many reports from May 2018 to April 17, 2019, including: #431, #285, #266, #273, #250, #160, #126, #399 and #380 (the last 2 of which remain open).
Log Files Attached
I have attached here "20190823T104926-crash.zip" which contains all the log files from this crash (while VS Code is still running, before restarting Extension Host):
I also included "20190823T104249-beforecrash.zip" and "20190823T122408-aftercrash.zip" for comparison showing what logs are like when I started up 5 minutes beforehand, a few minutes afterward, and a few days after I finally disabled Live Server, respectively:
Difficult to Pinpoint Extension Causing This Due to VS Code Logging Issues
However, it took months to identify Live Server as the cause of this, as it is hard to debug as the extension causing this crash doesn't get logged, possibly due to failing to flush logged entries in time. The Extension Host crash itself doesn't even get logged in many cases, just shown in a notification to the user.
As I have hundreds of extensions enabled and this crash doesn't occur every time on every startup (though frequently, every few VSCode launches or few days), I couldn't disable one-by-one or even in batches to identify which extension was causing this.
Underlying Cause and VS Code Changes Needed?
What do you believe is the root cause of this issue, or what has it been with Live Server in the past?
I may file a bug report with VSCode regarding the frequency of this occurring with so many different extensions and the difficulty of troubleshooting or identifying which extension causes it. Crashing every other extension, by crashing the Extension Host, should not be as frequent an occurrence in VSCode as it appears to be.
Therefore, any info on the underlying cause and any suggestions you may have in what VSCode can change to reduce the frequency of this or at least isolate it to crashing a single extension (instead of the extension host) would be helpful for that.
Also, is there something that could be done in Live Server at least to keep this from reoccurring so often in the future?
Does this seem like may be related to ProxyResolver#getCertificates error in exthost.log, "Starting to clean up unused language packs" in sharedprocess.log, extension update/download/install/cleanup or specific APIs or binary dependencies used?
Any relation to or idea of why others had often reported this extension host crash occurring for other extensions like Live Share Audio and Live Share Chat?
VSCode Core Improvements Needed to Avoid Reoccurrence and Effectively Troubleshoot: Extension Sandboxing and Improved Logging
It seems clear that VSCode extension host needs more "extension download/update/activation starting"-type log entries and more frequent log flushing as well as, if possible, flushing upon/after VSCode Extension Host crash or logging that isn't affected by that.
Also, VSCode really could use Extension Sandboxing like proposed in microsoft/vscode#52116 not just for security but also for reliability, in order to prevent one extension from crashing all other extensions and the entire VSCode Extension Host, as well as to make it more clear which extension had crashed/failed to load.
Worse yet, the Extension host crash itself doesn't get logged in most cases (not to any .log file in the logs folder at least). Only after I restart the Extension Host (eg. which I sometimes do 20 minutes after the original error, as it obscures the cause of it) as prompted in the crash notification, and then show the Developer Tools, do I see anything logged about the extension host crash (such as _onExtensionHostCrashed) in one of the Output windows. And even that fails to give any indication of the original error or even extension caused the crash. And even that doesn't seem to end up anywhere in the logs folder.
In that case (from an earlier crash, for which I haven't provided any log files) (and only after restarting the Extension Host) did I noticed the following in one of the Output windows indicating that a crash even occurred (other than the crash notification popup which always occurs immediately), shown below.
Only Extension Host-related Error Logged (from Earlier Crash)
New grammar file: file:///c%3A/Users/Dan/.vscode/extensions/redhat.vscode-yaml-0.4.1/syntaxes/yaml.tmLanguage.json
register @ /C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4084
/C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3501 [Extension Host] debugger listening on port 37858
/C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3499 Extension Host
/C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3499 Debugger attached.
/C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3345 Extension host terminated unexpectedly. Code: 3221225477 Signal: null
_onExtensionHostCrashed @ /C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3345
/C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2478 Extension host terminated unexpectedly.
onDidNotificationChange @ /C:/Users/Dan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2478
DevTools failed to parse SourceMap: https://ticino.blob.core.windows.net/sourcemaps/036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8/core/vs/workbench/workbench.main.nls.js.map
exthost.log for Extension Host has the following:
Extension Host log file (exthost.log) ends with the following entries:
[2019-08-23 10:49:40.926] [exthost] [info] ExtensionService#_doActivateExtension ritwickdey.LiveServer {"startup":true,"activationEvent":"*"}
...
[2019-08-23 10:49:42.465] [exthost] [info] eager extensions activated
[2019-08-23 10:49:42.471] [exthost] [error] ProxyResolver#getCertificates (intermediate value) is not a function
(end of file)
Following Log Entries only in Non-Crash Case
The additional log entries in exthost.log that occur for the non-crashing startup case include the following after ProxyResolver#getCertificates:
sharedprocess.log ends in the following line, in case relevant:
Starting to clean up unused language packs.
Live Server Log Files?
No Live Server-specific log files get output to C:\Users\Dan\Roaming\Code\logs. Where are these supposed to be found on disk? Do they typically only get generated if/when Live Server is used to launch an app/site?)
My Platform and Configuration
Live Server (ritwickdey.liveserver) v5.6.1
Visual Studio Code v1.37.1 (user setup)
Windows 10 x64 Pro (Windows NT x64 10.0.18362)
Startup Command line args: "C:\Users\Dan\AppData\Local\Programs\Microsoft VS Code\Code.exe" "C:{My Project Path}\README.md"
Electron: 4.27
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
The text was updated successfully, but these errors were encountered:
"Extension host terminated unexpectedly" has been occurring many of the times I startup VSCode (every few days) even while using Live Server v5.6.1, which was supposed to have fixed this issue, per the changelog.
Only by disabling Live Server was I able to stop these from occurring further.
Error Message Shown
This occurs seconds after launching VSCode, even if just launching to open nothing more than a README.md file, like in the case covered by the logs provided further below.
This error is shown in a popup notification prompting you to "Restart Extension Host" and "Open Developer Tools", like shown in the below screenshot.
Related Issues and History of Reoccurrence
I noticed "[NEW] Fixing Extension host terminated unexpectedly *[#431]" in the Changelog for "Version 5.6.1 (17.04.19)". However, even with my having the latest version, v5.6.1 installed, the issue remains and has been occurring for months now.
Beyond that, it seems that this is an issue that keeps reoccurring, with many reports from May 2018 to April 17, 2019, including: #431, #285, #266, #273, #250, #160, #126, #399 and #380 (the last 2 of which remain open).
Log Files Attached
I have attached here "20190823T104926-crash.zip" which contains all the log files from this crash (while VS Code is still running, before restarting Extension Host):
I also included "20190823T104249-beforecrash.zip" and "20190823T122408-aftercrash.zip" for comparison showing what logs are like when I started up 5 minutes beforehand, a few minutes afterward, and a few days after I finally disabled Live Server, respectively:
Difficult to Pinpoint Extension Causing This Due to VS Code Logging Issues
However, it took months to identify Live Server as the cause of this, as it is hard to debug as the extension causing this crash doesn't get logged, possibly due to failing to flush logged entries in time. The Extension Host crash itself doesn't even get logged in many cases, just shown in a notification to the user.
As I have hundreds of extensions enabled and this crash doesn't occur every time on every startup (though frequently, every few VSCode launches or few days), I couldn't disable one-by-one or even in batches to identify which extension was causing this.
Underlying Cause and VS Code Changes Needed?
What do you believe is the root cause of this issue, or what has it been with Live Server in the past?
I may file a bug report with VSCode regarding the frequency of this occurring with so many different extensions and the difficulty of troubleshooting or identifying which extension causes it. Crashing every other extension, by crashing the Extension Host, should not be as frequent an occurrence in VSCode as it appears to be.
Therefore, any info on the underlying cause and any suggestions you may have in what VSCode can change to reduce the frequency of this or at least isolate it to crashing a single extension (instead of the extension host) would be helpful for that.
Also, is there something that could be done in Live Server at least to keep this from reoccurring so often in the future?
Does this seem like may be related to ProxyResolver#getCertificates error in exthost.log, "Starting to clean up unused language packs" in sharedprocess.log, extension update/download/install/cleanup or specific APIs or binary dependencies used?
Any relation to or idea of why others had often reported this extension host crash occurring for other extensions like Live Share Audio and Live Share Chat?
VSCode Core Improvements Needed to Avoid Reoccurrence and Effectively Troubleshoot: Extension Sandboxing and Improved Logging
It seems clear that VSCode extension host needs more "extension download/update/activation starting"-type log entries and more frequent log flushing as well as, if possible, flushing upon/after VSCode Extension Host crash or logging that isn't affected by that.
Also, VSCode really could use Extension Sandboxing like proposed in microsoft/vscode#52116 not just for security but also for reliability, in order to prevent one extension from crashing all other extensions and the entire VSCode Extension Host, as well as to make it more clear which extension had crashed/failed to load.
Worse yet, the Extension host crash itself doesn't get logged in most cases (not to any .log file in the logs folder at least). Only after I restart the Extension Host (eg. which I sometimes do 20 minutes after the original error, as it obscures the cause of it) as prompted in the crash notification, and then show the Developer Tools, do I see anything logged about the extension host crash (such as _onExtensionHostCrashed) in one of the Output windows. And even that fails to give any indication of the original error or even extension caused the crash. And even that doesn't seem to end up anywhere in the logs folder.
In that case (from an earlier crash, for which I haven't provided any log files) (and only after restarting the Extension Host) did I noticed the following in one of the Output windows indicating that a crash even occurred (other than the crash notification popup which always occurs immediately), shown below.
Only Extension Host-related Error Logged (from Earlier Crash)
exthost.log for Extension Host has the following:
Extension Host log file (exthost.log) ends with the following entries:
Following Log Entries only in Non-Crash Case
The additional log entries in exthost.log that occur for the non-crashing startup case include the following after ProxyResolver#getCertificates:
sharedprocess.log.
sharedprocess.log ends in the following line, in case relevant:
Starting to clean up unused language packs.
Live Server Log Files?
No Live Server-specific log files get output to C:\Users\Dan\Roaming\Code\logs. Where are these supposed to be found on disk? Do they typically only get generated if/when Live Server is used to launch an app/site?)
My Platform and Configuration
The text was updated successfully, but these errors were encountered: