Vscode cannot open files or folders via dialog

No matter what I have tried so far, I am not able to open any file or folder from within code windows using the File > Open File, File > Open Folder or File > Add folder to workspace actions. “

There are no connections shown when I run snap connections code

I did not find anything relevant here: https://code.visualstudio.com/docs/setup/linux

Nothign appears in the console when using Help > Toggle Developer Tools.

I CAN open folders when launching VSCode from a console, e.g. code ~/myproject

Eventually I just removed the snap, re-installed from debs directly from the microsoft repo, and now I can open things using dialogs properly. I looked for a while but could find nothing beyond “Install using snap install code --classic" and no mention beyond that for having to configure any connections for the snap to work properly.

This was on 25.10, fully updated.

This is a classic snap, it has no interfaces and does not need them since classic confinement allows it full access to the system… for classic snaps snap is simply a delivery mechanism and nothing more (similar to you downloading a tarball of the app and running it from /opt) … technically there should be no reason why it can not open file dialogs, but you should definitely open an issue/bug at the bug tracker of that snap package…

You haven’t given enough detail to debug this.

What have you tried so far? Specifically, what folders have you tried to open?

What is the output of snap version?

If you snap install code –classic then snap run code And try to open a folder, what exactly happens? Please provide a screenshot.

1 Like

What have you tried so far? Specifically, what folders have you tried to open?

At risk of sounding flippant, I presumed the statement you quoted just about covered it, it was not exaggeration

by any file or folder, I meant literally any file or folder. But for specifics:

/home/USER/development/
/home/USER/development/mygitrepo
/home/user/development/mygitrepo/src
/home/user/development/mygitrepo/src/something.py

not one of those was opened when using a file-chooser dialog from within code while using the snap when I tried.

Fair, it was the latest stable, but that has been updated and so I just reinstalled the latest stable snap:

$ snap version
snap          2.73+ubuntu25.10
snapd         2.73+ubuntu25.10
series        16
ubuntu        25.10
kernel        6.17.0-8-generic
architecture  amd64

And this one is worse. Now it doesn’t launch from CLI, I can ONLY launch it from the app menu, and when launched that way there’s no way to open a folder or file as I mentioned.

Nothing happens:

bladernr@rocinante:~$ /snap/bin/code
bladernr@rocinante:~$ code
bladernr@rocinante:~$ snap run code  
bladernr@rocinante:~$ snap run code ~/development/context-timer
bladernr@rocinante:~$ code ~/development/context-timer
bladernr@rocinante:~$ /snap/bin/code ~/development/context-timer

that is all that happens. the Code window never actually opens.  Syslog only shows this:
2026-01-20T10:17:01.092288-05:00 rocinante systemd[3325]: Started snap.code.code-25a55a22-8e22-4898-8bc0-ad6e39f0ef48.scope.

So on this Jan 15 version, it is even more broken on 25.10. On the version before this I was at least able to open files when launching the snap version from CLI, now I cannot launch the snap version from CLI at all, with no errors, nothing I’ve found beyond that one line in syslog.

If I open it from the app menu, as I said, the window opens but then there’s no way to open a folder or file, but I can at least confiirm the snap is running per ps output:

$ ps axf |grep code3051618 pts/3    S+     0:00  |   |   |       _ grep --color=auto code
3049837 ?        SLsl   0:01  _ /snap/code/219/usr/share/code/code --no-sandbox --force-user-env --ozone-platform=x113049839 ?        S      0:00  |   _ /snap/code/219/usr/share/code/code --type=zygote --no-zygote-sandbox --no-sandbox
3049840 ?        S      0:00  |   _ /snap/code/219/usr/share/code/code --type=zygote --no-sandbox
3049924 ?        Sl     0:03  |   |   _ /snap/code/219/usr/share/code/code --type=zygote --no-sandbox
3049874 ?        Sl     0:00  |   _ /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-
<SNIP>

Before:

Folder picker open

and after clicking the Select button:

Finally, I also tried on my 24.04 machine… installed the snap, and it fails to launch from CLI for a completely different reason (or maybe the same reason, but on 25.10 the error/traceback is suppressed?)

I’d love to Ogra but this comes from Microsoft, and the snap store page does not offer a bug tracker:

https://snapcraft.io/code

it only points here: https://code.visualstudio.com/

and after several minutes of link clicking, I’ve yet to find a bug tracker (or something that looks like a bug tracker).

and the page lists Twitter as a “contact” so…

Note, I’m happy to be wrong here, I don’t have time to hunt for a bug tracker for a Microsoft product but if someone can find a bug tracker I’ll happily file one there.

The only reason I even raised this issue here is because the snap is fairly prominent, and in my experience does not work, on neither 24.04 nor 25.10, but the debs hosted by MSFT work perfectly.

Is there something interesting about your development folder, or home? Is it on NFS or a samba share or something? What’s the output of ls -ld ~/development.

Yeah weird, something is certainly wedged. When I first replied I checked there was nothing materially wrong with the code snap, and it works fine here.

Cheers, Al.

Out of curiosity can you try with LD_PRELOAD= snap run code (for the Ubuntu 24.04 issue specifically)

Thanks Everyone, and thanks @kenvandine whom I chatted with separately and got to the root cause… someone else (and the comment seems to have disappeared?) mentioned authd and after some digging and debugging with Ken that is indeed the issue… it was on the back end and once I worked around that the snap file/folder dialogs work as expected.

this system is using the Google authd provider and the generic workaround was to install nsncd which resolves the issue I was seeing with permissions on the back end.

2 Likes

We’re all Snapcrafters against Ken the Snapmaster :slight_smile: