Closed martaver closed 5 years ago
Note: running explorer.exe .
from a mounted windows drive, e.g. /mnt/c
works fine.
This is a blocker, preventing me from opening a project located on the linux file system in VSCode.
Things I'd try:
-Try using the real bash terminal or the new Windows terminal, not the one inside Vscode.
-Look at /etc/wsl.conf content. (that /c/WINDOWS/ is fishy)
-See dmesg
output to see if it tells what's happening.
I am mounting /mnt/...
drive directly under /
in my wsl.conf
...
I ruled that out, though, because explorer.exe .
works fine from within the mounted drive at /c/...
Would you mind giving me some more information on how I can debug this using dmesg?
VSCode remoting to WSL works quite nicely, btw.
Another troubleshooting idea: If you go into File Explorer and type in: \\wsl$\<yourDistroName\
into the address bar (replacing wsl -l
), does that work or does that result in an error?
Ah, so from File Explorer, browsing to \\wsl$\Ubuntu-18.04\
gives me error:
\\wsl$\Ubuntu-18.04 is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
Attempt to access invalid address.
Can't quite tell if this is a permissions issue, or 'invalid address'... any ideas?
This seems to be an error with the Plan 9 server. @SvenGroot is the resident expert for this area!
I suddenly have this issue too after upgrading to 18932. It worked previously but with issues (#4262)
sudo apt update && sudo apt upgrade
followed by wsl --shutdown
and then starting wsl again resolved the issue for me.
But I don't know if it's permanently or not.
@erikhakansson's steps didn't change the problem for me.
@Martaver I think your issue it's very similar to #4027 Keep reading and try the registry workaraound that Sven suggested in that thread.
I'm struggling with the same and the linked issue wasn't my problem - the registry values were already correct. apt upgrade
also made no difference although running wsl --shutdown
is helpful because it saves logging out or rebooting.
Same here.
\wsl$ is very unstable and drops from time to time. This seems to have something to do with number of writes - I often have the problem after working with a project from VSCode (and save the files several times).
It can be decieving that sometimes \wsl$\ can still be accessed, but this is from cache. If you try to actually open the files using notepad/vscode you will still have a filesystem error.
Restarting WSL with wsl --shutdown seems to fix it temporarily.
Ah, so from File Explorer, browsing to
\\wsl$\Ubuntu-18.04\
gives me error:\\wsl$\Ubuntu-18.04 is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions. Attempt to access invalid address.
Can't quite tell if this is a permissions issue, or 'invalid address'... any ideas?
I am seeing exactly the same issue on my Windows 10 1903 18941.1001. Updating Ubuntu or restarting WSL did not help. @Martaver, have you by any chance figured out how to fix this?
Exact same issue on Windows 10 1903, but when running explorer.exe
inside WSL, it opens Windows explorer on This PC page.
I've updated to 1903 18362.356 as of yesterday and I'm having this issue as well
\\wsl$
but when I double click I get:
dir \\wsl$\Ubuntu
does not works ("The system cannot find the path specified.")explorer.exe .
inside a /mnt point works fine. Explorer.exe comes up to the expected path locationexplorer.exe .
outside a /mnt point does nothing, it does not even bring explorer at allcode
does not work outside /mnt points, which is what bothers me the most. It used to work and I became dependent of it...I tried to:
I have another PC where that works as expected on 1903, explorer.exe .
etc...
Hi I seem to have exactly the same problem as David-Defoort, but with the Debian distro. 1903 18362.356 also.
Another troubleshooting idea: If you go into File Explorer and type in:
\\wsl$\<yourDistroName\
into the address bar (replacing with the name of your distro which you can see fromwsl -l
), does that work or does that result in an error?
This solution worked perfectly for me. Thanks!
I am now on 10.0.18362.388 and retried the disable wsl and that was successful (not sure if this is permanent or not). I started cmd with admin authority and entered "wsl -t Debian" After that File Explorer and enter \wsl$\Debian\ works.
When it happens, I usually do "Get-Service LxssManager | Restart-Service" from the PS (Run as administrator). I'm currently on 10.0.18999.1 and it seems WSL is a bit more stable now.
There have been a handful of fixes around the \wsl$\ paths so things should be much more robust now. Please reopen a new issue if you continue to see issues after build 19002.
It would be great if it'd be possible to map a network drive that points to a folder in the Linux subsystem:
Unfortunately that doesn't work and I don't see other options for editing those files with editors like JetBrains' (I'm talking about running the editor from the host, not the VM of course).
Any ideas?
fracasula, come at it from the other angle.
All of your windows files are accessible from within the linux distro under /mnt/
@fracasula Does simply mapping \\wsl$\Ubuntu-18.04 not work for you? You should be able to do that and then access the folder as Z:\root\Code.
Is there any reason you have to map the specific folder to a drive?
I was still having this problem up until today. Previously, my lowercase file path worked, \\wsl$\debian
, but reading https://github.com/microsoft/WSL/issues/4260#issuecomment-507841709 I tried uppercase to see if it fixed anything, \\wsl$\Debian
, and it worked, and it also made the lowercase paths start working again. So check your casing. Weirdly, shortcuts with the uppercase version do not work, only the lowercase version. This is a very annoying inconsistency. Every time I start windows I have to type in the wsl path in explorer to open any projects.
fracasula, come at it from the other angle.
All of your windows files are accessible from within the linux distro under /mnt/, so just store the files there. That way, both windows and linux has access to them.
I did not know that was possible, thanks 👍
FWIW. I was having issues with file watching when storing files Windows side, so depending on your needs, accessing files via /mnt
may not be viable.
For some others that encounter the same error, my case was able to be resolved by Set-ExecutionPolicy Unrestricted
in powershell. Previously I had changed it to remotesigned, and this was the source of not being able to access the /mnt directory.
Hi in this picture, you can see I don't have access my directory:
What is this?? thinclient_driver?!
also, I don't have access to the root folder?! Why?
how can I set root forever when I open it.
This is still an issue in March 2020. It happens 50% of the time. Sometimes it randomly starts working after 50 tries.
Ditto, latest windows 10 stable build, keep losing the WSL connection every few hours. So far the only "fix" is to reboot the entire computer.
I managed to temporarily fix this by starting a cmd with admin authority and entered "wsl -t Debian" (the name of my WSL instance) After that start File Explorer and enter \wsl$\Debian\ works. You might also add you comment on to the open issue i started after this one was closed. It is WSL2: can't access linux file system from Windows Explorer #4812
I gave up trying to get this to work consistently, I bit the bullet and moved all my projects out of WSL and rewrote my file watching scripts to work with Window's janky file change events :) ~ I'm about to buy another SSD just so I can install Debian... It's starting to not be worth the headache... Honestly...
This thread shouldn't have been closed before anyone could confirm that the updates actually solved this issue.
i am in the same boat, I use PHPStorm to edit a symfony project and I was hosting the project in windows and accessing it in linux as microsoft suggested but that broke when i upgraded from symfony 3.4 to 4.4. In Symfony 4.4 it was throwing hundreds of cache errors every page load (slowing things down badly) because it was trying to set linux utime on the cache files and i guess windows doesnt support the same time resolution in its file system or something like that.
@fracasula
Any ideas?
Yeah, use subst:
From cmd.exe:
subst S: \\wsl$\Ubuntu\home\elan\source\repos
Now to goto your s: drive
the subst above does not work for me (if the problem is "active" at the time - it just reports path not found. Very annoying as I have not had any other major problems
Thanks a lot @ElanHasson , now I can work with PhpStorm on my WSL2 distro without using FTP connection!
Thanks a lot @ElanHasson , now I can work with PhpStorm on my WSL2 distro without using FTP connection!
Hello ! I want to achieve the same goal as you, launching my project over wsl2 on phpstorm... I tried to subst like ElanHasson said my wsl2 home but cant explore it by explorer.. can you tell me how you did it please?
btw I access S: drive by cmd.
Im on windows 10 pro 19041
Thanks a lot @ElanHasson , now I can work with PhpStorm on my WSL2 distro without using FTP connection!
Hello ! I want to achieve the same goal as you, launching my project over wsl2 on phpstorm... I tried to subst like ElanHasson said my wsl2 home but cant explore it by explorer.. can you tell me how you did it please?
btw I access S: drive by cmd.
Im on windows 10 pro 19041
Ok sorry for the post, found out I can map my \wsl$\debian only, If i try to go deeper in folder directory its fail.
Thanks again!
Good to hear :)
Elan Hasson 561-445-4667
Same here, tried all the solutions, nothing works. \wsl$\Ubuntu is unreachable. explorer.exe only works in windows mount points. WSL2 is basically unusable this way.
Same here, tried all the solutions, nothing works. \wsl$\Ubuntu is unreachable. explorer.exe only works in windows mount points. WSL2 is basically unusable this way.
Same for me. Windows 2004 build 19640.1 with Ubuntu-20.04
@gottfired @edditor Open an elevated Powershell and post the output of these
reg query HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider /s
reg query HKLM\SYSTEM\CurrentControlSet\Services\p9np /s
reg query HKLM\SYSTEM\CurrentControlSet\Services\p9rdr /s
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder ProviderOrder REG_SZ P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order ProviderOrder REG_SZ P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder LanmanWorkstation REG_DWORD 0x7d0 RDPNP REG_DWORD 0x3e8 webclient REG_DWORD 0xbb8 P9NP REG_DWORD 0x1f4
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p9np Description REG_EXPAND_SZ @%systemroot%\system32\p9np.dll,-101 DisplayName REG_EXPAND_SZ @%systemroot%\system32\p9np.dll,-100
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p9np\NetworkProvider DeviceName REG_SZ \Device\P9Rdr DisplayName REG_EXPAND_SZ @%systemroot%\system32\p9np.dll,-100 Name REG_SZ Plan 9 Network Provider ProviderPath REG_EXPAND_SZ %SystemRoot%\System32\p9np.dll TriggerStartCompleteNotification REG_BINARY 7510BCA3541EC641 TriggerStartNotification REG_BINARY 7508BCA3541EC641 TriggerStartPrefix REG_SZ wsl$
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p9rdr DependOnService REG_MULTI_SZ RDBSS Description REG_SZ @%SystemRoot%\System32\drivers\p9rdr.sys,-101 DisplayName REG_SZ @%SystemRoot%\System32\drivers\p9rdr.sys,-100 ErrorControl REG_DWORD 0x1 ImagePath REG_EXPAND_SZ System32\drivers\p9rdr.sys Start REG_DWORD 0x3 Type REG_DWORD 0x1
@gottfired No issue here in build 19041 with the same reg entries.
Can you post the output of sudo dmesg
in pastebin or a gist?
@gottfired Thanks. I can't see anything wrong there. How about the output of sudo mount
?
/dev/sdb on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered) tmpfs on /mnt/wsl type tmpfs (rw,relatime) tools on /init type 9p (ro,relatime,dirsync,aname=tools;fmask=022,loose,access=client,trans=fd,rfd=6,wfd=6) none on /dev type devtmpfs (rw,nosuid,relatime,size=6518436k,nr_inodes=1629609,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime) proc on /proc type proc (rw,nosuid,nodev,noexec,noatime) devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620,ptmxmode=000) none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755) none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime) none on /run/shm type tmpfs (rw,nosuid,nodev,noatime) none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu) cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma) C:\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8) D:\ on /mnt/d type 9p (rw,noatime,dirsync,aname=drvfs;path=D:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)
@gottfired This thread is closed. Better follow #5307. We are waiting for the team to answer there.
I was having this issue today, but after updating the WSL kernel, it began working again!
For me the issue turned out to be that via Chocolatey WSL Ubuntu is installed to require admin rights (choco install wsl2 wsl-ubuntu-1804
). This is also reflected in that the command line is only accessible when running as an admin. I tried running explorer as admin but that didn't help.
It was solved by:
Afterward:
cd ~ && explorer.exe .
\\wsl$\Ubuntu-18.04
manually from explorer
Please fill out the below information:
Your Windows build number: 10.0.18922.1000
What you're doing and what's happening: Using visual studio code's bash terminal for WSL, I
cd ~
and attempt toexplorer.exe .
as per documentation here: https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes#place-your-linux-files-in-your-linux-root-file-systemWhat's wrong / what should be happening instead: Instead of opening
explorer.exe
at the corresponding folder in the linux file system, I get the error:Strace of the failing command, if applicable: No other errors logged. If I'm given instructions I'm happy to run diagnostic commands and report back.