Skip to content

Terminal Process Terminates with Exit Code: 1 #2947

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

Closed
VACoder opened this issue Sep 11, 2020 · 13 comments
Closed

Terminal Process Terminates with Exit Code: 1 #2947

VACoder opened this issue Sep 11, 2020 · 13 comments
Labels
Resolution-Inactive Will close automatically.

Comments

@VACoder
Copy link

VACoder commented Sep 11, 2020

Issue Description

When opening vscode error is displayed immediately. Takes a long time to start then fails to load session;

There is a second message about loading powershell extension is taking longer than expected.

'Starting powerhsell' appears in the bottom bar. Clicking it shows a message:

running the contributed command: 'PowerShell.ShowSessionMenu' failed.

Eventually PowerShell session fails to start.

Attached Logs

9/11/2020 5:37:40 PM [NORMAL] - Language server starting --
9/11/2020 5:37:40 PM [NORMAL] - PowerShell executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
9/11/2020 5:37:40 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Normal' -LogPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1599863860-60081aad-8de8-4380-95ac-54cfa56310801599863859157\EditorServices.log' -SessionDetailsPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-1708-338573' -FeatureFlags @()
9/11/2020 5:37:40 PM [NORMAL] - powershell.exe started.
9/11/2020 5:37:40 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Normal' -LogPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1599863860-60081aad-8de8-4380-95ac-54cfa56310801599863859157\EditorServices.log' -SessionDetailsPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-1708-338573' -FeatureFlags @()
9/11/2020 5:37:40 PM [NORMAL] - Waiting for session file
9/11/2020 5:41:41 PM [NORMAL] - Timed out waiting for session file to appear.
9/11/2020 5:41:41 PM [NORMAL] - Language server startup failed.
9/11/2020 5:41:41 PM [ERROR] - Error: Timed out waiting for session file to appear.
9/11/2020 5:41:41 PM [ERROR] - The language service could not be started:
9/11/2020 5:43:38 PM [NORMAL] - Shutting down language client...

Environment Information

Version: 1.49.0 (user setup)
Commit: e790b931385d72cf5669fcefc51cdf65990efa5d
Date: 2020-09-10T13:22:08.892Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 6.3.9600

Visual Studio Code

Name Version
Operating System Windows_NT x64 6.3.9600
VSCode 1.49.0
PowerShell Extension Version 2020.6.0

PowerShell Information

Name Value
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.19170
PSCompatibleVersions 1.0 2.0 3.0 4.0
PSRemotingProtocolVersion 2.2

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
ajax-snippets Memphis335 1.9.0
JSOM-Snippets Ma1984 0.0.16
powershell ms-vscode 2020.6.0
rest-client s-kainet 0.1.4
sp-tools Mike 0.3.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Sep 11, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @VACoder looks like its likely a known start-up issue, we plan to have a preview release out for you to try in the next few days--thanks!

@SydneyhSmith
Copy link
Collaborator

Thanks for your patience, the new preview release is out and we think it solves this issue--when you have a chance would you mind giving it a try and letting us know? Thanks!

@SydneyhSmith SydneyhSmith added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Sep 17, 2020
@VACoder
Copy link
Author

VACoder commented Sep 17, 2020

Is this the 2020.9.0 ? If so I get the same thing.
Thanks!

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 17, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Sep 17, 2020

Is this the 2020.9.0 ? If so I get the same thing.

In 2020.9.0, do you get an error message in the console? If so, can you share it?

@VACoder
Copy link
Author

VACoder commented Sep 18, 2020

9/17/2020 5:25:20 PM [NORMAL] - Visual Studio Code v1.49.0 64-bit
9/17/2020 5:25:20 PM [NORMAL] - PowerShell Preview Extension v2020.9.0
9/17/2020 5:25:20 PM [NORMAL] - Operating System: Windows 64-bit
9/17/2020 5:25:20 PM [NORMAL] - Language server starting --
9/17/2020 5:25:20 PM [NORMAL] - PowerShell executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
9/17/2020 5:25:20 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.9.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Diagnostic' -LogPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\logs\1600381520-dd28c3af-f942-434c-aee2-1466770ec4571600381253554\EditorServices.log' -SessionDetailsPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\sessions\PSES-VSCode-11440-306476' -FeatureFlags @()
9/17/2020 5:25:20 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.9.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Diagnostic' -LogPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\logs\1600381520-dd28c3af-f942-434c-aee2-1466770ec4571600381253554\EditorServices.log' -SessionDetailsPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\sessions\PSES-VSCode-11440-306476' -FeatureFlags @()
9/17/2020 5:25:20 PM [NORMAL] - powershell.exe started.
9/17/2020 5:25:20 PM [NORMAL] - Waiting for session file
9/17/2020 5:29:21 PM [NORMAL] - Timed out waiting for session file to appear.
9/17/2020 5:29:21 PM [NORMAL] - Language server startup failed.
9/17/2020 5:29:21 PM [ERROR] - The language service could not be started:
9/17/2020 5:29:21 PM [ERROR] - Error: Timed out waiting for session file to appear.

When trying to run a hello world script:

Cannot debug or run a PowerShell script until the PowerShell session has started. Wait for the PowerShell session to finish starting and try again.

@SydneyhSmith
Copy link
Collaborator

Thanks @VACoder the logs and pop up are helpful but did anything output in the integrated console? Knowing that error message would be super helpful--thanks!

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 22, 2020
@VACoder
Copy link
Author

VACoder commented Sep 22, 2020 via email

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 22, 2020
@VACoder
Copy link
Author

VACoder commented Sep 22, 2020 via email

@VACoder
Copy link
Author

VACoder commented Sep 25, 2020

Readding the POSH extension the following was displayed, which is, I believe, the same as the earlier one posted.
9/25/2020 10:15:08 AM [NORMAL] - Visual Studio Code v1.49.1 64-bit
9/25/2020 10:15:08 AM [NORMAL] - PowerShell Preview Extension v2020.9.0
9/25/2020 10:15:08 AM [NORMAL] - Operating System: Windows 64-bit
9/25/2020 10:15:08 AM [NORMAL] - Language server starting --
9/25/2020 10:15:08 AM [NORMAL] - PowerShell executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
9/25/2020 10:15:08 AM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.9.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Diagnostic' -LogPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\logs\1601046908-48c02c15-69e5-4547-80ff-e8af46eafec01601046907737\EditorServices.log' -SessionDetailsPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\sessions\PSES-VSCode-11336-630150' -FeatureFlags @()
9/25/2020 10:15:08 AM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.9.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Diagnostic' -LogPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\logs\1601046908-48c02c15-69e5-4547-80ff-e8af46eafec01601046907737\EditorServices.log' -SessionDetailsPath 'c:\Users<user>.vscode\extensions\ms-vscode.powershell-preview-2020.9.0\sessions\PSES-VSCode-11336-630150' -FeatureFlags @()
9/25/2020 10:15:08 AM [NORMAL] - powershell.exe started.
9/25/2020 10:15:08 AM [NORMAL] - Waiting for session file
9/25/2020 10:19:10 AM [NORMAL] - Timed out waiting for session file to appear.
9/25/2020 10:19:10 AM [NORMAL] - Language server startup failed.
9/25/2020 10:19:10 AM [ERROR] - The language service could not be started:
9/25/2020 10:19:10 AM [ERROR] - Error: Timed out waiting for session file to appear.

@rjmholt
Copy link
Contributor

rjmholt commented Sep 25, 2020

So, certainly the server is not starting. It says powershell.exe started, but it isn't creating the session file. Either powershell.exe is crashing or it's simply not progressing.

If it's crashing, I would expect to see red text where the Integrated Console is, either very briefly if it's a crash before the extension can handle it, or it should print the error and wait for keyboard input (so that catching startup errors is easier).

If none of those things are happening, it's likely this is due to something preventing the proper progression of powershell.exe, which we've seen in almost all cases is due to anti-virus of some kind.

Could you please share a GIF or video of the extension startup from start to finish so we can dig into this?

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 29, 2020
@ghost
Copy link

ghost commented Oct 14, 2020

This issue is being closed as inactive, if this issue is still occurring it will be re-opened

@ghost ghost added the Resolution-Inactive Will close automatically. label Oct 14, 2020
@ghost ghost closed this as completed Oct 14, 2020
@k-byun
Copy link

k-byun commented Dec 20, 2022

I'm getting the same error. Was there a fix or workaround for this?

@ghost
Copy link

ghost commented Dec 20, 2022

Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead.

@rjmholt rjmholt removed their assignment Apr 20, 2023
@similar-issues-ai similar-issues-ai bot mentioned this issue Apr 13, 2025
6 tasks
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Inactive Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants