Skip to content

ChannelClosedException: The channel has been closed - Intellisense and F8 stop working #4177

Closed
@dbrennand

Description

@dbrennand

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

Hi,

I've been experiencing an issue where predictive intellisense and F8 (run line/code selection) stop working.
I've collected some diagnostic logs and noticed the following error:

2022-09-21 10:20:25.349 +01:00 [VRB] Could not write to output handler, perhaps serialization failed?
System.Threading.Channels.ChannelClosedException: The channel has been closed.
   at System.Threading.Channels.AsyncOperation`1.GetResult(Int16 token)
   at OmniSharp.Extensions.JsonRpc.OutputHandler.ProcessOutputStream(CancellationToken cancellationToken)

Once this error occurs in the logs, I have to restart the integrated terminal for it to work again.

I noticed a similar error reported in #3800 and when this error occurs, I also have the endless formatting behaviour, but also intellisense and F8 stop working for me. This issue occurs for me on the latest PowerShell extension and preview extension.

Logs to follow via email.

PowerShell Version

PowerShell Extension v2022.8.5
Copyright (c) Microsoft Corporation.

https://aka.ms/vscode-powershell
Type 'help' to get help.

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.71.2
74b1f979648cc44d385a2286793c226e611f59e7
x64

Extension Version

Steps to Reproduce

  1. Launch project in VSCode: code .
  2. Open PowerShell script file and extension with integrated terminal is loaded.
  3. All is working for a short time and then predictive intellisense and F8 stop working.

Apologies for the lack of repo steps 😞 but I'm really not sure what exactly is causing this issue.

Visuals

No response

Logs

Logs sent via email.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions