SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

Since 1.24.1 / @ editing / Error while connecting to SSH FS : Couldn't find a configuration with the name '' #334

Closed konfuzius closed 2 years ago

konfuzius commented 2 years ago

On any server. Since the newest update (1.24.1.) Every time any file is getting edited. Initial server connection is still fine. No SSH FS configurations changes were made, but automatic version update. Tested on VSC 1.66/1.67.

Error: Error while connecting to SSH FS : Couldn't find a configuration with the name ''

SchoofsKelvin commented 2 years ago

This issue would be easier to solve with debug logs, so please follow these steps:

konfuzius commented 2 years ago

This issue would be easier to solve with debug logs, so please follow these steps:

  • Add DEBUG_SSH2 to the sshfs.flags array in VS Code's User Settings (settings.json) e.g. "sshfs.flags": ["DEBUG_SSH2"]

    • See this issue for more information about adding flags
  • If you already have a connection open, close it completely (or even reload the window)
  • Go to Output > SSH FS and copy the log from there after replicating your bug
  • While it should censor passwords/passphrases, I recommend checking it for (other) sensitive data first. _(especially since DEBUG_SSH2 activates some internal logging, which is less likely to be censored)_

SchoofsKelvin finally issues were caused by Github Copilot (tested with Github Copilot nightly with same output). I disabled the extension for a while, till you maybe get into that combination. And btw thanks for great extension.

zeroxx1986 commented 2 years ago

Here's my two cents:

SchoofsKelvin commented 2 years ago

I'm able to reproduce it. Looks like it's a weird Copilot thing where it tries to read .git/config relative to the opened file. But for e.g. ssh://server/tmp/file.py it should access ssh://server/tmp/.git/config but ends up attempting to read ssh:%5Cserver%5Ctmp%5C.git%5Cconfig instead. It's a bit of a malformed URI that still has the ssh scheme so my extension tries to deal with. The authority part of the URI, which should be server, is an empty string while path is \server\tmp\.git\config, i.e. the authority is wrongly added to it.

I'll add a post to Copilot Feedback about this. EDIT: I've reported the issue along with a solution for them to fix it. In regards to my extension, in a future version stat calls for non-existing files won't result in a notification. It'll still be logged to the output pane.