continue icon indicating copy to clipboard operation
continue copied to clipboard

"Unable to resolve filesystem provider" in devcontainer

Open amihalik opened this issue 2 years ago • 6 comments

Before submitting your bug report

Relevant environment info

- OS: windows host, mcr.microsoft.com/devcontainers/python:1-3.11-bullseye devcontainer
- Continue: v0.0.403

Description

It seems like commands like /comment don't know where my files are when I'm working in a dev container. For instance, I tried to add comments to a file config.py in my project, and I got these errors in the Developer Tool:

[Extension Host] Error listing directory contents:  Error (FileSystemError): Unable to resolve filesystem provider with relative file path 'vscode-remote://dev-container\workspaces\continue-deploy'
	at k.e (c:\Users\---------\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:109:27846)
	at Object.readDirectory (c:\Users\---------\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:109:24745)
	at async IdeProtocolClient.getDirectoryContents (c:\Users\---------\.vscode\extensions\continue.continue-0.0.403\out\extension.js:67780:28)
	at async IdeProtocolClient.handleMessage (c:\Users\---------\.vscode\extensions\continue.continue-0.0.403\out\extension.js:67569:26)
Error handling message (showDiff) from Continue server: Unable to resolve filesystem provider with relative file path 'vscode-remote://dev-container\tmp\continue\$backslash$workspaces$backslash$continue-deploy$backslash$config.py'
c @ notificationsAlerts.ts:42

To reproduce

Here's an clean example on a new project:

  1. Create a new VS code window (ctrl + shift + n)
  2. Connect to a new dev container (ctrl + alt + o, "New Dev Container")
  3. Select "Python 3" devcontainer
  4. Select "Create Dev Container" (wait for dev container to load)
  5. Validate Continue still works (i.e. ctrl + shift + l, "foo bar", verify output LLM output is in the continue view)
  6. Create a new file (eg. "hello_world.py", print('hello world'))
  7. Add the code to continue (ctrl + a, ctrl + shift +m) and run /comment
  8. Notice lots of flashing errors in the lower right of vscode
  9. Open developer tools, notice errors like:
Error handling message (showDiff) from Continue server: Unable to resolve filesystem provider with relative file path 'vscode-remote://dev-container\tmp\continue\$backslash$workspaces$backslash$python-2$backslash$hello_world.py'
c @ workbench.desktop.main.js:sourcemap:765
Extension Host] Error listing directory contents:  Error (FileSystemError): Unable to resolve filesystem provider with relative file path 'vscode-remote://dev-container\workspaces\python-2'
	at k.e (c:\Users\1111\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:109:27846)
	at Object.readDirectory (c:\Users\11111\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:109:24745)
	at async IdeProtocolClient.getDirectoryContents (c:\Users\1111\.vscode\extensions\continue.continue-0.0.403\out\extension.js:67780:28)
	at async IdeProtocolClient.handleMessage (c:\Users\1111\.vscode\extensions\continue.continue-0.0.403\out\extension.js:67569:26)

Log output

No response

amihalik avatar Sep 28 '23 06:09 amihalik

I see the general problem here - we're checking the OS of the host when deciding whether to format paths with forward or backslashes, and the host is Windows, so sends paths with the wrong separator. I'd assume these paths exist if given the correct separator (in the Debian container).

Mostly a note to myself, but the requirement to solve this is just finding a reliable way of determining the OS of the dev container or remote machine (vscode.workspace.fs doesn't seem to provide anything out-of-the-box). I'll give this a short tmr

sestinj avatar Sep 28 '23 08:09 sestinj

I have a similar problem. I use CodeServer. When I try /edit write a bash script same happens but with a different error message that leads I guess to the same problem

error handling message (showDiff) from Continue server: Error (FileSystemError): Unable to resolve filesystem provider with relative file path 'vscode-remote://cs.dev.treehouse.corpremoteagent'

cs.dev.treehouse.corp is the remote host in my local network where the code-server is running

hgw77 avatar Oct 06 '23 09:10 hgw77

I note $backslash in the error there: 'vscode-remote://dev-container\tmp\continue\$backslash$workspaces$backslash$python-2$backslash$hello_world.py'

Could it be this is a solved problem and you just need to use $backslash instead of \?

gemmell avatar Jan 02 '24 03:01 gemmell

@sestinj , the above message was meant for you. It seems there is already something at play that distinguishes which backslash to use (possibly provided by vscode), can you just use $backslash instead of doing the hard work of reliably determining the OS of the dev container or remote OS?

gemmell avatar Jan 30 '24 08:01 gemmell

@gemmell very sorry I missed this! The "$backslash" here was replaced with "f" or "b" in more recent versions, the relevant code being here, and we made a number of related fixes in just the last few weeks. Is this still happening for you on latest versions? If so, what's the best way for me to set up an environment like yours to reproduce?

sestinj avatar Jan 30 '24 19:01 sestinj

Hello team, are you officially supporting CodeServer? Thanks

Extremys avatar Mar 04 '24 19:03 Extremys