PowerShell / vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items/ms-vscode.PowerShell
MIT License
1.7k stars 490 forks source link

System.Management.Automation.PSInvalidOperationException: You should only run a nested pipeline from within a running pipeline. #1766

Closed PrzemyslawKlys closed 2 years ago

PrzemyslawKlys commented 5 years ago

System Details

System Details Output

### VSCode version: 1.31.1 1b8e8302e405050205e69b59abb3559592bb9e60 x64

### VSCode extensions:
aaron-bond.better-comments@2.0.3
abusaidm.html-snippets@0.2.1
adelphes.google-search-ext@0.2.1
akamud.vscode-theme-onedark@2.1.0
AlanWalk.markdown-toc@1.5.6
alefragnani.Bookmarks@10.2.2
andrew-lis.workbench@0.1.7
auchenberg.vscode-browser-preview@0.3.1
azemoh.one-monokai@0.3.7
ban.spellright@3.0.24
batisteo.vscode-django@0.19.0
bierner.github-markdown-preview@0.0.2
bierner.markdown-checkbox@0.1.1
bierner.markdown-emoji@0.0.7
bierner.markdown-preview-github-styles@0.1.4
bierner.markdown-yaml-preamble@0.0.2
DavidAnson.vscode-markdownlint@0.24.0
DavidWang.ini-for-vscode@0.0.4
daylerees.rainglow@1.5.2
donjayamanne.githistory@0.4.6
donjayamanne.jupyter@1.1.4
donjayamanne.python-extension-pack@1.4.0
DotJoshJohnson.xml@2.4.0
dracula-theme.theme-dracula@2.16.0
dunstontc.dark-plus-syntax@0.0.149
eamodio.gitlens@9.5.1
ecmel.vscode-html-css@0.2.0
EditorConfig.EditorConfig@0.13.0
emilast.LogFileHighlighter@2.4.3
emmanuelbeziat.vscode-great-icons@2.1.46
Equinusocio.vsc-material-theme@2.7.0
esbenp.prettier-vscode@1.8.1
felixfbecker.php-debug@1.12.6
formulahendry.code-runner@0.9.7
gerane.Theme-dimmed-monokai@0.0.2
gharveymn.nightswitch@1.1.0
GitHub.vscode-pull-request-github@0.4.0
GlenBuktenica.unicode-substitutions@2.0.1
GrapeCity.gc-excelviewer@2.1.29
hdg.live-html-previewer@0.3.0
hnw.vscode-auto-open-markdown-preview@0.0.4
HookyQR.beautify@1.4.9
IBM.output-colorizer@0.1.2
ikappas.phpcs@1.0.5
ionutvmi.reg@0.0.2
JerryHong.autofilename@0.1.3
joaompinto.asciidoctor-vscode@2.3.3
johnpapa.winteriscoming@0.8.8
Kelvin.vscode-sshfs@1.12.3
kisstkondoros.vscode-codemetrics@1.17.4
KnisterPeter.vscode-github@0.30.1
liximomo.remotefs@0.0.13
magicstack.MagicPython@1.1.0
mariorodeghiero.vue-theme@1.1.2
mechatroner.rainbow-csv@1.0.0
mkloubert.vs-deploy@14.0.0
mkloubert.vscode-remote-workspace@0.41.0
ms-mssql.mssql@1.4.0
ms-python.python@2019.1.0
ms-vscode.csharp@1.17.1
ms-vscode.PowerShell@1.11.0
ms-vscode.PowerShell-Preview@2.0.0
ms-vsliveshare.vsliveshare@0.3.1182
ms-vsts.team@1.144.1
msjsdiag.debugger-for-chrome@4.11.2
quicktype.quicktype@12.0.46
redhat.java@0.38.0
redhat.vscode-yaml@0.3.0
robertohuertasm.vscode-icons@8.2.0
seedess.vscode-remote-editor@0.0.1
Shan.code-settings-sync@3.2.5
stkb.rewrap@1.9.1
streetsidesoftware.code-spell-checker@1.6.10
streetsidesoftware.code-spell-checker-polish@1.0.0
swyphcosmo.spellchecker@1.2.13
teabyii.ayu@0.18.0
techer.open-in-browser@2.0.0
TomasHubelbauer.zip-file-system@1.0.0
vangware.dark-plus-material@2.0.4
VisualStudioExptTeam.vscodeintellicode@1.1.3
vscjava.vscode-java-debug@0.16.0
vscjava.vscode-java-dependency@0.3.0
vscjava.vscode-java-pack@0.6.0
vscjava.vscode-java-test@0.14.1
vscjava.vscode-maven@0.14.2
WakaTime.vscode-wakatime@1.2.5
wayou.vscode-todo-highlight@1.0.4
wesbos.theme-cobalt2@2.1.6
whizkydee.material-palenight-theme@1.9.4
wholroyd.jinja@0.0.8
xaver.clang-format@1.9.0
yzhang.markdown-all-in-one@2.1.0
zhuangtongfa.Material-theme@2.18.2
Zignd.html-css-class-completion@1.11.0

### PSES version: 2.0.0.0

### PowerShell version:

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

Issue Description

I am experiencing a problem with... crashing.

Expected Behaviour

Not crashing.

Actual Behaviour

Crashes. I'm simply editing some code (not related to WMI/CMI) and it crashes.

Attached Logs

1550691460-f32c13ab-29b6-48b7-a99a-334abfbd2b6d1550679980365.zip

rkeithhill commented 5 years ago

Relevant section of the log file:

    ---> (Inner Exception #0) System.Management.Automation.PSInvalidOperationException: You should only run a nested pipeline from within a running pipeline.
       at System.Management.Automation.Runspaces.PipelineBase.DoConcurrentCheck(Boolean syncCall, Object syncObject, Boolean isInLock)
       at System.Management.Automation.Runspaces.RunspaceBase.DoConcurrentCheckAndAddToRunningPipelines(PipelineBase pipeline, Boolean syncCall)
       at System.Management.Automation.Runspaces.PipelineBase.CoreInvoke(IEnumerable input, Boolean syncCall)
       at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
       at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
       at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
       at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
       at System.Management.Automation.PowerShell.InvokeWithDebugger(IEnumerable`1 input, IList`1 output, PSInvocationSettings settings, Boolean invokeMustRun)
       at System.Management.Automation.ScriptDebugger.ProcessCommand(PSCommand command, PSDataCollection`1 output)
       at System.Management.Automation.CommandCompletion.ProcessCompleteInputCommand(Command cmd, Debugger debugger)
       at System.Management.Automation.CommandCompletion.CompleteInputInDebugger(Ast ast, Token[] tokens, IScriptPosition cursorPosition, Hashtable options, Debugger debugger)
       at System.Management.Automation.CommandCompletion.CompleteInput(Ast ast, Token[] tokens, IScriptPosition cursorPosition, Hashtable options, PowerShell powershell)
       at Microsoft.PowerShell.EditorServices.AstOperations.<>c__DisplayClass2_1.<GetCompletionsAsync>b__0(PowerShell pwsh)
       at Microsoft.PowerShell.EditorServices.PowerShellContext.<InvokeOnPipelineThreadAsync>d__84.MoveNext()