Skip to content

Dev containers compatibility #928

Closed
Closed

Description

@Cianidos

Before submitting your bug report

Relevant environment info

- OS: macOS 14.3.1
- Continue: v0.9.79 (pre-release)
- IDE: VSCode

ollama 0.1.27
using devcontainer

Description

While using tab autocomplete inside a dev container, this message occurs:

Unable to read file '/workspaces/path-to-in-dev-container/main.go' (Error: Unable to resolve nonexistent file '/workspaces/path-to-in-dev-container/main.go')

I think it tries to get context, but look at host instead of real path to volume.
When I use chat with file as context, everything is okay.

Thanks in advance

To reproduce

Open folder in dev container
Enable tab complete
Type

Log output

[Extension Host] Error generating autocompletion:  Error: Unable to read file '/workspaces/go-templ-ctl/src/cli/main.go' (Error: Unable to resolve nonexistent file '/workspaces/go-templ-ctl/src/cli/main.go')
    at n.F (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:657:19968)
    at n.D (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:657:19763)
    at async f.M (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2203:42897)
    at async f.readStream (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2203:42654)
    at async L.Cb (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2192:13459)
    at async L.resolve (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2192:11906)
    at async s.W (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2203:39048)
    at async h.r (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2192:25544)
    at async C.acquire (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:37:3392)
    at async u.createModelReference (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2192:27121)
p @ console.ts:137

Activity

  1. LTangaF commented on Mar 11, 2024

    @LTangaF

    I've seen this, too. I disabled tab-completion to avoid it, though I was hoping to try using it. Containers and remote containers is my normal operating mode.

  2. aharonamir commented on Mar 13, 2024

    @aharonamir

    I also that the option for remote-container/linux will be available as I am developing from windows on a remote linux, and the ollama runs on windows

  3. LTangaF commented on Mar 13, 2024

    @LTangaF

    Local containers just seems like a directory mapping issue. Remote containers may just be that, but it may also be that the extension is largely running in the local chromium environment, but the file browser (etc) is being served up by a remote vscode server

  4. aharonamir commented on Mar 13, 2024

    @aharonamir

    My issue is that the extension runs on the local machine, which is windows but the code is on the remote machine, which is linux.
    So it cannot access the file on the remote or cannot handle the linux file path (the '/' instead of ')

  5. jpaveg commented on Mar 17, 2024

    @jpaveg

    Also having this issue. Seeing this error:

    Unable to read file '\jpaveg\code\tutorials\nextjs\app\lib\data.ts'
    (Error: Unable to resolve nonexistent file '\jpaveg\code\tutorials\nextjs\app\lib\data.ts')

    The correct filePath should be prepended with home/. Seems similar to a previous issue involving remote containers.

  6. kicedz commented on May 3, 2024

    @kicedz

    I'm using WSL2 Ubuntu (with Docker too) on my Windows machine, also dockerized containers.
    I'm getting the same error Unable to read file >> from my wsl2 ubuntu.
    Any fixes?

  7. jpaveg commented on May 4, 2024

    @jpaveg

    I'm using WSL2 Ubuntu (with Docker too) on my Windows machine, also dockerized containers. I'm getting the same error Unable to read file >> from my wsl2 ubuntu. Any fixes?

    make sure you're on pre-release

  8. platform-kit commented on Jun 21, 2024

    @platform-kit

    Is this solved?

  9. added
    area:autocomplete
    kind:bug
    ide:vscode
    and removed on Jul 8, 2024
  10. olecsys commented on Aug 30, 2024

    @olecsys

    Hey guys, any updates on this issue?

  11. github-actions commented on Mar 9, 2025

    @github-actions
    Contributor

    This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

  12. sanderbollen-clockworks commented on Mar 14, 2025

    @sanderbollen-clockworks

    Any updates on this? We are experiencing similar behaviour on remote development feature in Jetbrains products.

  13. ansible42 commented on Apr 17, 2025

    @ansible42

    I got it working in VSCode by opening up the proxy. Still having issues getting it working with clion

    			"settings": {
    				"extensions.verifySignature": false,
    				"http.proxy": "(your_proxy_host:port)", //This is because of issues with the corp proxyhttps://stackoverflow.com/questions/55992660/vscode-remote-container-extensions-not-installing-on-dev-container-using-docke
    				"http.proxyStrictSSL": false
    			}
  14. added
    os:mac
    on May 7, 2025
  15. samrocketman commented on Jul 28, 2026

    @samrocketman

    This does not appear to be completed for VS Code Dev Containers.

    • ✅ Can chat
    • ✅ Can read and write files when loaded in devcontainer. Only if extension is installed in the devcontainer.
    • ❌ Runs on the host if installed on host. In devcontainer should only run within devcontainer.
    • ❌ Cannot ask the agent to do any shell commands when in devcontainer. e.g. ask agent to run ls and it cannot.

    My host is PopOS 24.04 Linux (not Mac).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:autocompleteide:vscodekind:bugneeds-triageos:mac

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions