Skip to content
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

PSRemoting: "An error occurred while creating the pipeline" error during exection of commands inside of a session #3025

Closed
SSvilen opened this issue Oct 23, 2020 · 10 comments
Labels
Resolution-Inactive Will close automatically.

Comments

@SSvilen
Copy link

SSvilen commented Oct 23, 2020

Issue Description

I am experiencing a problem with psremoting - when using a command inside of a remote session I get a screen full with the following error until I hit Ctrl+C:

That happens only with PS 5, but not with PS 7.

An error occurred while creating the pipeline.
+ CategoryInfo : NotSpecified: (:) [], RuntimeException
+ FullyQualifiedErrorId : RuntimeException

image

Attached Logs

All logs are attached.
Logs.zip

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17763
VSCode 1.49.1
PowerShell Extension Version 2020.6.0

PowerShell Information

Name Value
PSVersion 5.1.17763.1432
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17763.1432
BuildVersion 10.0.17763.1432
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
azure-account ms-vscode 0.9.3
azure-pipelines ms-azure-devops 1.177.0
bracket-pair-colorizer CoenraadS 1.0.61
code-settings-sync Shan 3.4.3
csharp ms-dotnettools 1.23.4
csharpfixformat Leopotam 0.0.84
cshtml fireside21 0.1.3
gc-excelviewer GrapeCity 3.0.40
githistory donjayamanne 0.6.12
gitlens eamodio 10.2.2
mssql ms-mssql 1.9.0
powershell ms-vscode 2020.6.0
prettier-vscode esbenp 5.7.1
tabnine-vscode TabNine 3.0.3
terraform hashicorp 2.2.3
theme-cobalt2 wesbos 2.1.6
vscode-docker ms-azuretools 1.7.0
vscode-icons vscode-icons-team 11.0.0
vscode-kubernetes-tools ms-kubernetes-tools 1.2.1
vscode-yaml redhat 0.11.1
xml DotJoshJohnson 2.5.1
@ghost ghost added the Needs: Triage Maintainer attention needed! label Oct 23, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @SSvilen a few questions to help us further debug... does this work outside of VSCode in Windows PowerShell? What kind of PowerShell remoting are you using? And what version of PowerShell is the client and what version is the target?
Thanks!

@SydneyhSmith SydneyhSmith added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Oct 27, 2020
@SSvilen
Copy link
Author

SSvilen commented Nov 3, 2020

Thanks @SSvilen a few questions to help us further debug... does this work outside of VSCode in Windows PowerShell? What kind of PowerShell remoting are you using? And what version of PowerShell is the client and what version is the target?
Thanks!

does this work outside of VSCode in Windows PowerShell?
Yes

What kind of PowerShell remoting are you using?
WinRM

And what version of PowerShell is the client and what version is the target?
The client version is listed above.
The target is:

Name                           Value
----                           -----
PSVersion                      5.1.14393.3866
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.3866
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 3, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @SSvilen does this also occur while debugging, or using F8?

@SSvilen
Copy link
Author

SSvilen commented Nov 6, 2020

Actually it happens when I just open new session from the integrated console and then from inside the session I do 'ls'.
Or any other command.

@SydneyhSmith
Copy link
Collaborator

Thanks @SSvilen, would it be possible for you to test in your environment if you create a ps1 file with ls in it, and then run the file by pressing F5 once you are in the session?

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Nov 10, 2020
@SSvilen
Copy link
Author

SSvilen commented Nov 16, 2020

Hi @SydneyhSmith ,

when I try to do psedit c:\temp\test.ps1 inside of the session, I'm facing the same behaviour, until at some point the PS extension crashes with:

A new guard page for the stack cannot be created 

Screenshots:
image
image

May be it's somehow related to the fairly strict and locked down environment, where I work.
Nothing outside of C:\work is allowed for execution.
Funny thing is, I don't see that problem with PS 7 (which is again installed under C:\work)

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 16, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @SSvilen that is great information! Instead of doing a psedit, could you try opening a new file with the line gci in it, and running it with F5 or F8, it can even be untitled--thanks !

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Nov 19, 2020
@SSvilen
Copy link
Author

SSvilen commented Nov 24, 2020

@SydneyhSmith How do I open it without psedit? That's the only way I know to open a file for execution in a remote session.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 24, 2020
@TylerLeonhardt
Copy link
Member

Do this:

  • open an untitled file in vscode (ctrl+n)
  • change it to a PowerShell file (ctrl+shift+p then type "change language mode", hit enter, choose PowerShell)
  • write gci in that file, put your cursor on that line
  • Hit F8

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

ghost commented Dec 16, 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 Dec 16, 2020
@ghost ghost closed this as completed Dec 16, 2020
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

3 participants