Skip to content

[Preview] Never ending formatting #3800

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
5 tasks done
PrzemyslawKlys opened this issue Jan 29, 2022 · 4 comments
Closed
5 tasks done

[Preview] Never ending formatting #3800

PrzemyslawKlys opened this issue Jan 29, 2022 · 4 comments
Labels

Comments

@PrzemyslawKlys
Copy link
Contributor

PrzemyslawKlys commented Jan 29, 2022

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all 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.

Summary

I've been coding all day and suddenly - not sure what I did but I couldn't format anymore.

Stuck

After that - nothing works. Restarting helped

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.3.0-preview.1
PSEdition                      Core
GitCommitId                    7.3.0-preview.1
OS                             Microsoft Windows 10.0.22000
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.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64

Extension Version

Steps to Reproduce

Happened randomly during formatting

Visuals

No response

Logs

1643479538-9d087c75-4b26-4436-a88e-2ffd9e2962ef1643453184506.zip

2022-01-29 20:45:33.599 +01:00 [VRB] Looking for handler for descriptors textDocument/codeAction
2022-01-29 20:45:33.599 +01:00 [VRB] Checking handler textDocument/codeAction:Microsoft.PowerShell.EditorServices.Handlers.PsesCodeActionHandler
2022-01-29 20:45:33.599 +01:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeActionRegistrationOptions
2022-01-29 20:45:33.599 +01:00 [VRB] Document Selector [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1]
2022-01-29 20:45:33.599 +01:00 [VRB] Handler Selected: Microsoft.PowerShell.EditorServices.Handlers.PsesCodeActionHandler d204ebb8-aa92-4314-98b9-b21c6694bfc8 via [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler`2[[OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeActionParams, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022],[OmniSharp.Extensions.LanguageServer.Protocol.Models.CommandOrCodeActionContainer, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]])
2022-01-29 20:45:33.599 +01:00 [DBG] Queueing "Parallel":textDocument/codeAction:5110 request for processing
2022-01-29 20:45:33.599 +01:00 [DBG] Starting: Processing request textDocument/codeAction 5110
2022-01-29 20:45:33.599 +01:00 [DBG] Starting: Routing Request (5110) textDocument/codeAction
2022-01-29 20:45:33.599 +01:00 [VRB] Converting params for Request (5110) textDocument/codeAction to OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeActionParams
2022-01-29 20:45:33.599 +01:00 [VRB] Converting params for Notification textDocument/codeAction to OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeActionParams
2022-01-29 20:45:33.599 +01:00 [VRB] Updating Resolve items with wrapped data for textDocument/codeAction:Microsoft.PowerShell.EditorServices.Handlers.PsesCodeActionHandler
2022-01-29 20:45:33.600 +01:00 [VRB] Response value was OmniSharp.Extensions.LanguageServer.Protocol.Models.CommandOrCodeActionContainer
2022-01-29 20:45:33.600 +01:00 [DBG] Finished: Routing Request (5110) textDocument/codeAction in 0ms
2022-01-29 20:45:33.600 +01:00 [DBG] Finished: Processing request textDocument/codeAction 5110 in 0ms
2022-01-29 20:45:33.794 +01:00 [VRB] Named pipe connected
2022-01-29 20:45:33.794 +01:00 [VRB] Recreating debug adapter
2022-01-29 20:45:33.794 +01:00 [VRB] Subscribing debug server for session ended event
2022-01-29 20:45:33.794 +01:00 [VRB] Starting debug server
2022-01-29 20:45:33.808 +01:00 [INF] Host starting
2022-01-29 20:45:33.808 +01:00 [DBG] Host start requested after already started.
2022-01-29 20:45:43.270 +01:00 [DBG] Debug session ended, restarting debug service...
2022-01-29 20:45:43.270 +01:00 [VRB] Restarting debug server
2022-01-29 20:45:43.270 +01:00 [VRB] Recreating debug adapter transport
2022-01-29 20:45:43.270 +01:00 [VRB] Creating named pipe
2022-01-29 20:45:43.270 +01:00 [VRB] Waiting for named pipe connection
2022-01-29 20:48:35.479 +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)
@PrzemyslawKlys PrzemyslawKlys added the Issue-Bug A bug to squash. label Jan 29, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jan 29, 2022
@JustinGrote
Copy link
Collaborator

I've had the formatter hang on me a couple times but not for long, worth looking into.

@StevenBucher98 StevenBucher98 removed the Needs: Triage Maintainer attention needed! label Feb 9, 2022
@dbrennand
Copy link

Hi, I'm seeing this exact exception, but intellisense and F8 also stop working when this exception appears in the extension logs:

2022-09-20 16:17:35.956 +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)

@PrzemyslawKlys Did you ever fix this problem?

Thanks 🙂

@PrzemyslawKlys
Copy link
Contributor Author

I use newest preview. Havent had issues since months

@dbrennand
Copy link

dbrennand commented Sep 21, 2022

Hmmm, OK thanks @PrzemyslawKlys - Are you using PowerShell 7.2.6 and may I ask what version of the PSReadLine module do you have?

I read in issue #3393 that PSReadLine may be causing the exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants