WSL terminal not available sometimes in "New Tab" dropdown on start-up #10032

Closed
opened 2026-01-31 02:10:44 +00:00 by claunia · 10 comments
Owner

Originally created by @ophers on GitHub (Aug 6, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.959]
Windows Terminal version (if applicable): 1.1.2021.0

Any other software? Yes
Ubuntu-20.04

Steps to reproduce

Start-up Windows Terminal normally, i.e. Click on the pinned Task-Bar icon

Expected behavior

The "New Tab" dropdown should list "Ubuntu-20.04"

Actual behavior

The "New Tab" dropdown doesn't list "Ubuntu-20.04". To get it listed I need to perform the following:

  1. Open Settings, i.e. from the dropdown menu.
    Visual Studio opens with the settings.json file.
  2. Make a benign change, i.e. add a space and delete it, and save.
  3. Now Windows Terminal lists "Ubuntu-20.04" under the "New Tab" dropdown (no closing reopening necessary).
Originally created by @ophers on GitHub (Aug 6, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.959] Windows Terminal version (if applicable): 1.1.2021.0 Any other software? Yes Ubuntu-20.04 ``` # Steps to reproduce Start-up Windows Terminal normally, i.e. Click on the pinned Task-Bar icon # Expected behavior The "New Tab" dropdown should list "Ubuntu-20.04" # Actual behavior The "New Tab" dropdown doesn't list "Ubuntu-20.04". To get it listed I need to perform the following: 1. Open Settings, i.e. from the dropdown menu. Visual Studio opens with the settings.json file. 2. Make a benign change, i.e. add a space and delete it, and save. 3. Now Windows Terminal lists "Ubuntu-20.04" under the "New Tab" dropdown (no closing reopening necessary).
Author
Owner

@LuanVSO commented on GitHub (Aug 7, 2020):

this repro to me if I open wt when WSL is booting up

@LuanVSO commented on GitHub (Aug 7, 2020): this repro to me if I open wt when WSL is booting up
Author
Owner

@zadjii-msft commented on GitHub (Aug 7, 2020):

Yea, we're definitely getting some recurring issues where if WSL is slow to start up, the profiles aren't detected correctly. Maybe there's a better way we can do the auto-detection than using wsl -l, because that seems pretty fragile.

There's more info in #6946, including some workarounds you can use.

@benhillis is there any way that we could get the list of WSL distros without having to wait for the WSL service to start?

@zadjii-msft commented on GitHub (Aug 7, 2020): Yea, we're definitely getting some recurring issues where if WSL is slow to start up, the profiles aren't detected correctly. Maybe there's a better way we can do the auto-detection than using `wsl -l`, because that seems pretty fragile. There's more info in #6946, including some workarounds you can use. @benhillis is there any way that we could get the list of WSL distros without having to wait for the WSL service to start?
Author
Owner

@DHowett commented on GitHub (Aug 13, 2020):

Yanking triage. This isn't something readily fixable, but... here's a thought.

@zadjii-msft what if we cache the output of the most successful run of wsl.exe (heck, we could even use JSON) and use that if and only if it doesn't respond? That way we get a continuity behavior and don't run the risk of leaving dead/old WSL installations in the list...

@DHowett commented on GitHub (Aug 13, 2020): Yanking triage. This isn't something readily fixable, but... here's a thought. @zadjii-msft what if we cache the output of the most successful run of wsl.exe (heck, we could even use JSON) and use that _if and only if_ it doesn't respond? That way we get a continuity behavior and don't run the risk of leaving dead/old WSL installations in the list...
Author
Owner

@zadjii-msft commented on GitHub (Aug 13, 2020):

Wait but, what would happen of the very first launch after a user installs WSL and a distro? We'd have nothing cached, WSL wouldn't be running yet, so this "cache" wouldn't have any distros listed, and it wouldn't help.

Or if someone closes the terminal, closes all their WSL instances, then uninstalls one, and reboots. The WSL service isn't running, but our cache still has the uninstalled distro listed, so we can't trust that.

@zadjii-msft commented on GitHub (Aug 13, 2020): Wait but, what would happen of the _very first_ launch after a user installs WSL and a distro? We'd have nothing cached, WSL wouldn't be running yet, so this "cache" wouldn't have any distros listed, and it wouldn't help. Or if someone closes the terminal, closes all their WSL instances, then uninstalls one, and reboots. The WSL service isn't running, but our cache still has the uninstalled distro listed, so we can't trust that.
Author
Owner

@DHowett commented on GitHub (Aug 13, 2020):

The cache isn’t used “when WSL isn’t running”, it’s used when WSL doesn’t respond to our request for distros in a timely manner. It seems to do that reasonably often, judging by these reports. In the vast majority of cases, it would operate just like it does today: wsl -l would not spontaneously hang, and it would return the distribution list and we wouldn’t even hit the fallback list.

@DHowett commented on GitHub (Aug 13, 2020): The cache isn’t used “when WSL isn’t running”, it’s used when WSL doesn’t respond to our request for distros in a timely manner. It seems to do that reasonably often, judging by these reports. In the vast majority of cases, it would operate just like it does today: `wsl -l` would not spontaneously hang, and it would return the distribution list and we wouldn’t even hit the fallback list.
Author
Owner

@DHowett commented on GitHub (Aug 13, 2020):

So it’s less of a cache and more of a “last known good state, please use in case of emergency.” If the user just installed a distribution and WSL is unable to enumerate it, I’d venture that they have MUCH bigger problems than “terminal can’t find it.” 😄

@DHowett commented on GitHub (Aug 13, 2020): So it’s less of a cache and more of a “last known good state, please use in case of emergency.” If the user _just installed_ a distribution and WSL is unable to enumerate it, I’d venture that they have MUCH bigger problems than “terminal can’t find it.” 😄
Author
Owner

@zadjii-msft commented on GitHub (Oct 19, 2020):

As noted in #7965, this might actually be #6160. @DHowett thoughts on resolving as a dupe?

@zadjii-msft commented on GitHub (Oct 19, 2020): As noted in #7965, this might actually be #6160. @DHowett thoughts on resolving as a dupe?
Author
Owner

@vadimkantorov commented on GitHub (Oct 19, 2020):

@zadjii-msft pointed me to this issue (mine was duplicate). duplicating my comment/proposal here :)

Duplicate of #6160?

It could be that just CPU is busy: I'm loading a big Chrome process at the same time. Or could it be that the WSL service/driver hasn't started yet? But even if CPU is busy / WSL is slow to respond, it should not throw this error or discard a profile from the list (even if WSL is slow or does not respond). Maybe it should ask the user if I want to retry or maybe show some welcome "no terminal opened" screen instead (e.g. Speed Dial like in browsers)

@vadimkantorov commented on GitHub (Oct 19, 2020): @zadjii-msft pointed me to this issue (mine was duplicate). duplicating my comment/proposal here :) Duplicate of #6160? It could be that just CPU is busy: I'm loading a big Chrome process at the same time. Or could it be that the WSL service/driver hasn't started yet? But even if CPU is busy / WSL is slow to respond, it should not throw this error or discard a profile from the list (even if WSL is slow or does not respond). Maybe it should ask the user if I want to retry or maybe show some welcome "no terminal opened" screen instead (e.g. Speed Dial like in browsers)
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #10967, which has now been successfully released as Windows Terminal Preview v1.10.2383.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #10967, which has now been successfully released as `Windows Terminal Preview v1.10.2383.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.10.2383.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #10967, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #10967, which has now been successfully released as `Windows Terminal Preview v1.11.2421.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.2421.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10032