vscode-powershell: Error: The terminal process terminated with exit code: {0}

System Details

  • Operating system name and version Windows 10 Enterprise 64-bit
  • VS Code version Version 1.43.2 Version 1.44.0-insider
  • PowerShell extension version PSVersion = 5.1.17763.1007
    PSEdition = Desktop
    PSCompatibleVersions = {1.0, 2.0, 3.0, 4.0…}
    BuildVersion = 10.0.17763.1007
    CLRVersion = 4.0.30319.42000
    WSManStackVersion = 3.0
    PSRemotingProtocolVersion = 2.3
    SerializationVersion = 1.1.0.1

Issue Description

PowerShell will not load with the newest version.

Expected Behaviour

I reverted back to PowerShell 2019.11.0 and this one works just fine.

Troubleshooting Steps Taken

  • Disabled all extensions. Tested again.
  • Uninstalled PowerShell 2020.3.0 and reinstalled it. Could not reinstall it till I went to task manager and ended the PowerShell.exe from the Details Tab in task manager.
  • Installed Insider version and then installed 2020.3.0 in it, same problem. The only extension I have ever loaded inside the insider version is PowerShell.

Actual Behavior

  • I get an error message: The terminal process terminated with exit code: {0} [Unable to upload image.]

  • Log (Extension Host):

[2020-04-07 16:51:44.863] [exthost] [info] extension host started
[2020-04-07 16:51:44.935] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2020-04-07 16:51:44.936] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/debug-auto-launch/dist/extension
[2020-04-07 16:51:44.956] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2020-04-07 16:51:44.956] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/emmet/dist/extension
[2020-04-07 16:51:44.980] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.git","_lower":"vscode.git"},"activationEvent":"*"}
[2020-04-07 16:51:44.981] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/git/dist/main
[2020-04-07 16:51:45.039] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":true,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"*"}
[2020-04-07 16:51:45.039] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/github-authentication/dist/extension.js
[2020-04-07 16:51:45.065] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2020-04-07 16:51:45.065] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/merge-conflict/dist/extension
[2020-04-07 16:51:45.081] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2020-04-07 16:51:45.081] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/search-result/dist/extension.js
[2020-04-07 16:51:45.089] [exthost] [info] ExtensionService#_doActivateExtension vscode.vscode-account {"startup":true,"extensionId":{"value":"vscode.vscode-account","_lower":"vscode.vscode-account"},"activationEvent":"*"}
[2020-04-07 16:51:45.089] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/extensions/vscode-account/dist/extension.js
[2020-04-07 16:51:45.116] [exthost] [info] eager extensions activated
[2020-04-07 16:51:46.176] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.powershell {"startup":false,"extensionId":{"value":"ms-vscode.powershell","_lower":"ms-vscode.powershell"},"activationEvent":"onView:PowerShellCommands"}
[2020-04-07 16:51:46.176] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/MyAccount/.vscode-insiders/extensions/ms-vscode.powershell-2020.3.0/out/src/main
  • Log (Shared):
[2020-04-07 16:51:44.736] [sharedprocess] [info] main {"machineId":"17724cfb55c272d294eaa6e2732bb7866b3e98c5fffc4e3d8ce8af346a2d8e12","windowId":2}
[2020-04-07 16:52:24.801] [sharedprocess] [info] Starting to clean up unused language packs.
  • Output (PowerShell Editor Service)
[Info  - 4:52:41 PM] PowerShell runtime version: 5.1.17763.1007, edition: Desktop
[Info  - 4:52:41 PM] highlight handler loaded
[Error - 4:52:42 PM] Could not resolve Script Analyzer settings path due to null or empty workspaceRootPath.
  • Output (PowerShell Extension Logs)
4/7/2020 4:51:47 PM [NORMAL] - Visual Studio Code v1.44.0-insider 64-bit
4/7/2020 4:51:47 PM [NORMAL] - PowerShell Extension v2020.3.0
4/7/2020 4:51:47 PM [NORMAL] - Operating System: Windows 64-bit
4/7/2020 4:51:47 PM [NORMAL] - Language server starting --
4/7/2020 4:51:47 PM [NORMAL] -     PowerShell executable: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
4/7/2020 4:51:47 PM [NORMAL] -     PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.3.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\logs\1586296307-6a614b26-d20b-43fe-8bc4-4ed30cd773761586296302268\EditorServices.log' -SessionDetailsPath 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\sessions\PSES-VSCode-23996-302478' -FeatureFlags @() 
4/7/2020 4:51:47 PM [NORMAL] -     PowerShell Editor Services args: Import-Module 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.3.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\logs\1586296307-6a614b26-d20b-43fe-8bc4-4ed30cd773761586296302268\EditorServices.log' -SessionDetailsPath 'c:\Users\MyAccount\.vscode-insiders\extensions\ms-vscode.powershell-2020.3.0\sessions\PSES-VSCode-23996-302478' -FeatureFlags @() 
4/7/2020 4:51:47 PM [NORMAL] - powershell.exe started.
4/7/2020 4:51:47 PM [NORMAL] - Waiting for session file
4/7/2020 4:52:37 PM [NORMAL] - Session file found
4/7/2020 4:52:37 PM [NORMAL] - Registering terminal close callback
4/7/2020 4:52:37 PM [NORMAL] - Registering terminal PID log callback
4/7/2020 4:52:37 PM [NORMAL] - Language server started.
4/7/2020 4:52:37 PM [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\\\.\\pipe\\PSES_edqlrxwa.jmb","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_sjvdawdk.xpl"}
4/7/2020 4:52:37 PM [NORMAL] - Connecting to language service on pipe \\.\pipe\PSES_edqlrxwa.jmb...
4/7/2020 4:52:37 PM [NORMAL] - Language service connected.
4/7/2020 4:52:42 PM [WARNING] - Invalid Version: null

Workaround

  • Disable Auto Update
  • Downgrade to PowerShell 2020.1.0 or less

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 29 (6 by maintainers)

Most upvoted comments

Solution:

Turns out what solved it for us, was an update to BeyondTrust - Privilege Management for Windows, somehow it was keeping the newer versions of PowerShell from running.