-
Notifications
You must be signed in to change notification settings - Fork 513
Better error message when using unsupported PowerShell #4521
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
Comments
Do you potentially have a profile configured? Does it open normally otherwise? |
Thanks for reaching out to me. |
I meant your powershell profile. If you open powershell and type |
HI Justine. this is the output of the profile command
|
OK just checking. It's not common for PowerShell to lock up, however I noticed your current verson is 7.1.4. That version is out of support. You may want to try the latest 7.2 or 7.3, there may be bugfixes that resolve the issue. |
Ah, this is similar to #4371. Deprecated versions of PowerShell (such as 6.x and 7.1) will fail to load the module (because since they're deprecated the module isn't compatible with their out-of-date versions of .NET). Unfortunately, our error messaging around this is poor, and as we identified in that last issue we should say "hey! You're using 6.x or 7.1, you need to update" instead of this "undefined" message. That's on me, I'll get to it this week! |
That is perfect. I downloaded the MSI of the new powershell module<https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.msi> and it fixed my issue. Really appreciate your assistance to fix this issue.
|
Way better error handling for this in the works too! |
Prerequisites
Summary
I am getting this error every time I start VS code
4/16/2023 1:10:06 PM [NORMAL] - pwsh.exe started.
4/16/2023 1:10:06 PM [NORMAL] - Waiting for session file...
4/16/2023 1:10:36 PM [WARNING] - Loading the PowerShell extension is taking longer than expected. If you're using privilege enforcement software, this can affect start up performance.
4/16/2023 1:14:08 PM [NORMAL] - Timed out waiting for session file to appear!
4/16/2023 1:14:08 PM [ERROR] - PowerShell process failed to start:
4/16/2023 1:14:08 PM [ERROR] - Timed out waiting for session file to appear!
4/16/2023 1:14:08 PM [ERROR] - Unknown session status 'undefined' with reason 'undefined
PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
the error is produced at each start of Visual studio Code, both by standard or run as admin. Tried to uninstall extension and reinstall. does not fix
get this error
The terminal process "C:\Program Files\PowerShell\7\pwsh.exe '-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', 'Import-Module 'c:\Users\ahmads.vscode\extensions\ms-vscode.powershell-2023.3.3\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2023.3.3' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\ahmads.vscode\extensions\ms-vscode.powershell-2023.3.3\modules' -EnableConsoleRepl -StartupBanner "PowerShell Extension v2023.3.3 Copyright (c) Microsoft Corporation. https://aka.ms/vscode-powershell Type 'help' to get help. " -LogLevel 'Normal' -LogPath 'c:\Users\ahmads\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\logs\1681614605-ae62c778-393e-45ea-aa23-844718bebce11681614602721\EditorServices.log' -SessionDetailsPath 'c:\Users\ahmads\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSC...
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: