microsoft / microsoft/VFSForGit

BrokenPipeException when mounting has misleading error message

Open
#1,142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects: live-site affects: polish platform: linux platform: macOS platform: windows
Dominant language
C#
Stars
6.1k
Forks
474
Avg merge
2d 4h
Merged PRs (30d)
8

Description

Could not connect to GVFS.Mount: GVFS.Common.NamedPipes.BrokenPipeException: Unable to send: GetStatus ---> System.IO.IOException: Pipe is broken.
at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at GVFS.Common.NamedPipes.NamedPipeClient.SendRequest(String message)
--- End of inner exception stack trace ---
at GVFS.Common.NamedPipes.NamedPipeClient.SendRequest(String message)
at GVFS.Common.GVFSEnlistment.WaitUntilMounted(String enlistmentRoot, Boolean unattended, String& errorMessage)

"Could not connect to GVFS.Mount" is misleading, as gvfs mount was able to connect to GVFS.Mount. This error occurs after connecting:

https://github.com/microsoft/VFSForGit/blob/22582651bfd96c936ef609ec2fa76c4f75ddb66d/GVFS/GVFS.Common/GVFSEnlistment.cs#L129

A more accurate error message might be something like "Connection with GVFS.Mount has been broken, check mount process logs for details".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in GVFS/GVFS.Common/GVFSEnlistment.cs around line 129, where WaitUntilMounted reports the connection failure. Review the surrounding error handling and update the message so it describes a broken connection after mounting rather than failure to connect; the reported output should no longer claim that GVFS.Mount could not be reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
operating-systems
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.