Skip to content

VS Code + PowerShell 7 from the Store Broken #3384

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
potatoqualitee opened this issue May 31, 2021 · 11 comments
Closed

VS Code + PowerShell 7 from the Store Broken #3384

potatoqualitee opened this issue May 31, 2021 · 11 comments
Labels
Area-PSReadLine Bug: PowerShell Core Bugs when using PowerShell Core. Resolution-External Will close automatically.

Comments

@potatoqualitee
Copy link
Contributor

Issue Description

I am experiencing a problem with I'm guessing the PowerShell 7 Store.

After seeing the results in the video below, I upgraded psreadline, EditorServicesCommandSuite, I even deleted them from my system entirely from my system then reinstalled the extension so perhaps it's the versions within the extension.

I've installed/reinstalled/uninstalled powershell 7 as well as the extensions and the required modules.

This breaks on all modules.

Attached Logs

Attached
logs.zip

vscode.mp4

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.19041
VSCode 1.56.2
PowerShell Extension Version 2021.5.0

PowerShell Information

Name Value
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.0 7.1.3
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
bracket-pair-colorizer CoenraadS 1.0.61
code-settings-sync Shan 3.4.3
powershell-preview ms-vscode 2021.5.0
remote-containers ms-vscode-remote 0.177.2
remote-ssh ms-vscode-remote 0.65.4
remote-ssh-edit ms-vscode-remote 0.65.6
remote-wsl ms-vscode-remote 0.56.3
search dbatools 1.1.3
vscode-docker ms-azuretools 1.13.0
vscode-github-actions cschleiden 0.17.0
vscode-icons vscode-icons-team 11.4.0
vscode-pull-request-github GitHub 0.26.0
vscode-theme-1984 juanmnl 0.3.4
vscode-yaml redhat 0.19.2
wordcount ms-vscode 0.1.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label May 31, 2021
@andyleejordan
Copy link
Member

This is due to your machine having an incompatible version of PSReadLine 2.2.0-beta2. It is curious, as far as I'm aware that issue should only occur with the latest PowerShell 7 preview 7.2.0-preview.6 and you look like you have 7.1.3, but the stack trace is identical to the problem reported in #3385. Please revert PSReadLine to 2.1.0 (either just uninstall PSReadLine and let the extension use its bundled version instead, or manually revert or even upgrade to beta3).

@andyleejordan andyleejordan added Area-PSReadLine Bug: PowerShell Core Bugs when using PowerShell Core. Resolution-External Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Jun 1, 2021
@andyleejordan
Copy link
Member

@rjmholt Can you help me confirm this? The store release is 7.1.3, which I would have thought was compatible with PSReadLine 2.2.0-beta2, but I mean check that stack trace as it flies by in the GIF.

@rjmholt
Copy link
Contributor

rjmholt commented Jun 1, 2021

It's definitely in the prediction part of PSReadLine, which suggests that it's related to that.

@andyleejordan
Copy link
Member

I downloaded that GIF and stepped through it frame by frame, it is the same stack trace.

@andyleejordan
Copy link
Member

Ok we have a plan: to avoid incompatibility issues such as this and #3385 we are going to patch PowerShellEditorServices to only load our bundled version of PSReadLine.

@andyleejordan
Copy link
Member

@daxian-dbw this is such a strange issue, it's the exact same stack trace caused by the incompatibility issue, but it's with 7.1.3; @rjmholt thinks he may know what's going on.

@ghost ghost closed this as completed Jun 1, 2021
@daxian-dbw
Copy link
Member

2.2.0-beta2 version of PSReadLine shouldn't have this issue with 7.1.x because the affected bits only kick in when the .NET version is >= 6, while 7.1.x uses .NET 5. The logs show the path to the pwsh.exe but not the version of the powershell:

C:\Users\ctrlb\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe

This path looks like installed from Windows Store, and it's likely 7.2.0-preview.6

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jun 1, 2021
@andyleejordan
Copy link
Member

Hey @potatoqualitee are you perhaps using "PowerShell Preview" in the store?

@andyleejordan
Copy link
Member

So ok, this is strange, but for some reason 2.2.0 is being bundled alongside 2.1.0.

@andyleejordan
Copy link
Member

Going to leave this closed in favor of #3387, the task to fix the build. The latest stable release is patched and only contains PSReadLine 2.1.0, effectively avoiding this problem.

@potatoqualitee
Copy link
Contributor Author

@andschwa I think I was using the PS Preview but then uninstalled it and went with the stable version and both were broken. Seems like you have the solution though, thank you!

@andyleejordan andyleejordan removed the Needs: Maintainer Attention Maintainer attention needed! label Jul 20, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-PSReadLine Bug: PowerShell Core Bugs when using PowerShell Core. Resolution-External Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants