Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when launching..Could not access starting directory #10245

Closed
xtiansimon opened this issue May 28, 2021 · 19 comments
Closed

error when launching..Could not access starting directory #10245

xtiansimon opened this issue May 28, 2021 · 19 comments
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@xtiansimon
Copy link

xtiansimon commented May 28, 2021

Windows Terminal version (or Windows build number)

1.8.1444.0

Other Software

  • PowerToys v0.37.2 (newly installed ~2 weeks)
  • Windows 10 Pro 20H2 Build 19042.985 (newly installed < 1mo.) No other issues.
  • Kate 21.04.0 (newly installed ~1 week)
  • Windows Terminal Settings?
    • Added paste setting
    • added color schemes
      • "Gruvbox Dark",
      • "Gruvbox Dark Blu",
    • Anaconda and WSL2 settings
            {
                "colorScheme": "Gruvbox Dark",
                "commandline": "cmd.exe /K %USERPROFILE%\\Miniconda3_32\\Scripts\\activate.bat",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6102}",
                "hidden": false,
                "icon": "%USERPROFILE%\\Miniconda3_32\\Menu\\Iconleak-Atrous-Console.ico",
                "name": "Anaconda Prompt (Miniconda3_32)",
                "startingDirectory": "C:\\Users\\myname",
                "tabTitle": "Anaconda (qb)"
            },
            {
                "bellStyle": "none",
                "colorScheme": "Gruvbox Dark Blu",
                "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
                "hidden": false,
                "name": "Debian",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "C:\\Users\\myname",
                "tabTitle": "WSL (Debian)"
            },

Steps to reproduce

This happened after latest update. I tried toggling WSL in "manage app execution aliases" as recommended in another recent post but this did not improve the broken Windows Terminal. Windows Terminal error 0x80070003 when launching `fedoraremix.exe' #10167

Repair is not sufficient. Only Reset brings back the WSL functionality. If I reset Windows app and return to base settings then Debian works, but of course Conda is missing.

I have nearly the exact same setup on my remote work computer-- same Windows Terminal version, Windows Terminal settings (except for different path/machine name), recent installs of PowerToys and Kate. Windows 10 version on work computer is also the same. I remote into using RDP. No issues there.

I use Windows Terminal nearly every day to use Debian to SSH into remote server. Have experience no issues until yesterday.

Expected Behavior

Launch of Anaconda or WSL2 Debian

Actual Behavior

[error 0x8007010b when launching `wsl.exe -d Debian']
Could not access starting directory "C:\Users\myname"

[error 0x8007010b when launching `cmd.exe /K %USERPROFILE%\Miniconda3_32\Scripts\activate.bat']
Could not access starting directory "C:\Users\myname"
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 28, 2021
@zadjii-msft
Copy link
Member

Huh. Out of curiosity, what happens when you remove startingDirectory from your settings?

We stopped validating those before on launch in #10045. Before that, we'd just silently fall back to %userprofile% when we couldn't validate the directory.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label May 28, 2021
@xtiansimon
Copy link
Author

"...remove startingDirectory from your settings?"

I think that fixed it.

The issue happened immediately these past few days, so maybe it's fixed?
Is it better I close the issue solved now? Or, I will be using WT more extensively tomorrow (Saturday 5/29). I can report back the results after further use, and close it then, too.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 28, 2021
@Faris999
Copy link

Huh. Out of curiosity, what happens when you remove startingDirectory from your settings?

This error just happened to me today, and this fixed it. I think the startingDirectory field becomes null. Maybe because of an update?

@xtiansimon
Copy link
Author

I will be using WT more extensively tomorrow (Saturday 5/29). I can report back the results after further use, and close it then, too.

So far so good. Thanks for the input zadjii-msft.

@eamodio
Copy link

eamodio commented May 29, 2021

I was seeing the same thing, and it looked like a % character was lost in the startingDirectory field -- it had %USERPROFILE\foo rather than %USERPROFILE%\foo. This seemed to happen to all my profiles, and everything worked fine before the upgrade.

@eamodio
Copy link

eamodio commented May 29, 2021

IMO this should be re-opened

@nozzlegear
Copy link

The latest update seems to have broken my starting directory as well. Manually editing the starting directory fixed the issue, but I had made no changes to it from the default installation and this update broke it.

@ThomasRedstone
Copy link

I'm seeing this happen as well, my starting directory was set to /home/tom/, which does exist within WSL, but Terminal was trying to set the starting directory to C:/home/tom, if I create a home directory within Windows it will then run WSL, but I start in /mnt/c/home/tom.

@akempe
Copy link

akempe commented May 31, 2021

It doesn't seem to be possible to set the starting directory to anywhere inside the WSL file system. Everything you put there seems to get appended/mapped to a Windows path. @xtiansimon would you mind re-opening this?

@ThomasRedstone
Copy link

It doesn't seem to be possible to set the starting directory to anywhere inside the WSL file system. Everything you put there seems to get appended/mapped to a Windows path. @xtiansimon would you mind re-opening this?

Quite right, though I don't believe I ever set the value, so perhaps the update is changing it to something that isn't valid?

@DHowett
Copy link
Member

DHowett commented Jun 1, 2021

It doesn't seem to be possible to set the starting directory to anywhere inside the WSL file system.

This has never been possible, but due to aggressive path "validation" it was ignored, and reset to C:\Users\yourname. For some people, this looked like it was working. In every case, however, it was not. Folks just had invalid startingDirectory settings that were being ignored instead of reported.

@akempe
Copy link

akempe commented Jun 1, 2021

It doesn't seem to be possible to set the starting directory to anywhere inside the WSL file system.

This has never been possible, but due to aggressive path "validation" it was ignored, and reset to C:\Users\yourname.

Makes sense, but this isn't exactly clear and I'm sure confuses a hell of a lot of people as I'm pretty sure they're not expecting to be dealing with the Windows FS in those settings. I note the point made in #10305 that we should use //wsl$/{distro}/home/{wsl username}, but this feels like it's not obvious either. Am I missing some docs or coming at this wrong?

@DHowett
Copy link
Member

DHowett commented Jun 1, 2021

We've got some documentation specifying this, but we could probably make it clearer and surface it in the UI somewhere.

@wolf99
Copy link
Contributor

wolf99 commented Jun 2, 2021

My settings use "startingDirectory": "//wsl$/Ubuntu/home/{user}" which is correct per #10305 but I'm still seeing this error when WT is launched before WSL is running ("cold" start).
If I start WSL in advance (a "warm" start), then WT has no problem with this path... does that point to a different root cause?

@DHowett
Copy link
Member

DHowett commented Jun 2, 2021

This is a somewhat annoying issue where WSL cannot handle \\wsl$ paths until it's been launched once, which we're hoping to ameliorate with #9223

@AaronMcHale
Copy link

Getting a similar or the same problem. I have my start directory set to //wsl$/Ubuntu/home/aaron, this has been working fine for me for a long time, until today where after installing Windows 10 Cumulative Update for June 2021, I now get an error on starting WSL inside Windows Terminal. I have to start WSL outside of Windows Terminal first, using the default starting directory, then opening WSL inside Windows Terminal works, which is now rather annoying.

@mwoodpatrick
Copy link

I'm seeing the same issue in Version 10.0.22000 Build 22000, it does seem like this issue should be reopened

@alvarochvz
Copy link

Reporting that this issue is present on my windows version

Version 10.0.19043 -- Compilatio 19043

@DHowett
Copy link
Member

DHowett commented Aug 9, 2021

Yes, this issue should be moved to the wsl repository

@microsoft microsoft locked and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests