Terminal shows an empty window and then a conhost window opens after 30s when used as default terminal application #21146

Open
opened 2026-01-31 07:34:30 +00:00 by claunia · 17 comments
Owner

Originally created by @binki on GitHub (Jan 27, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.26020.1000

Other Software

No response

Steps to reproduce

  1. Run cmd from the Start box or Start Menu.

Expected Behavior

  1. Windows Terminal to open with the specified console application.

Actual Behavior

  1. A Windows Terminal opened without any session in it.
  2. 30 seconds pass.
  3. A fallback conhost appears with my desired program.
  4. Upon exiting the desired program and conhost closing, the Windows Terminal launches a PowerShell session.

See this video: https://github.com/microsoft/terminal/assets/82626/bd07a775-f033-43dc-b8a8-7c793c90fcd1

Originally created by @binki on GitHub (Jan 27, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.26020.1000 ### Other Software _No response_ ### Steps to reproduce 1. Run cmd from the Start box or Start Menu. ### Expected Behavior 1. Windows Terminal to open with the specified console application. ### Actual Behavior 1. A Windows Terminal opened without any session in it. 2. 30 seconds pass. 3. A fallback conhost appears with my desired program. 4. Upon exiting the desired program and conhost closing, the Windows Terminal launches a PowerShell session. See this video: https://github.com/microsoft/terminal/assets/82626/bd07a775-f033-43dc-b8a8-7c793c90fcd1
Author
Owner

@binki commented on GitHub (Jan 27, 2024):

I do see DCOM timeout errors in the Windows System log related to the E12CFF52-A866-4C77-9A90-F570A7AA2C6B service.

@binki commented on GitHub (Jan 27, 2024): I do see DCOM timeout errors in the Windows System log related to the E12CFF52-A866-4C77-9A90-F570A7AA2C6B service.
Author
Owner

@binki commented on GitHub (Jan 27, 2024):

I think that the reason that the powershell came up is because I had pressed enter for the exit command in conhost and my key wasn’t released before Terminal received focus. Most background scripts which create terminal windows stay in the blank frame state.

@binki commented on GitHub (Jan 27, 2024): I think that the reason that the powershell came up is because I had pressed enter for the `exit` command in conhost and my key wasn’t released before Terminal received focus. Most background scripts which create terminal windows stay in the blank frame state.
Author
Owner

@binki commented on GitHub (Jan 27, 2024):

The biggest two annoyances are that, when this happens, I start getting a very large number of leftover empty frame Terminal and that I have to wait 30s for anything to happen. I think this issue goes away if I reboot, but I shouldn’t have to do that all the time—makes me feel like I’m using Windows 98 again.

@binki commented on GitHub (Jan 27, 2024): The biggest two annoyances are that, when this happens, I start getting a very large number of leftover empty frame Terminal and that I have to wait 30s for anything to happen. I think this issue goes away if I reboot, but I shouldn’t have to do that all the time—makes me feel like I’m using Windows 98 again.
Author
Owner

@zadjii-msft commented on GitHub (Jan 29, 2024):

Can you share the actual DCOM errors in the event log/? That might help investigate here.

(fwiw, you can usually close those stay empty terminal windows by opening a tab, then closing the window. I'd still like to get to the root cause of why this is happening though ☺️ )

@zadjii-msft commented on GitHub (Jan 29, 2024): Can you share the actual DCOM errors in the event log/? That might help investigate here. (fwiw, you can usually close those stay empty terminal windows by opening a tab, then closing the window. I'd still like to get to the root cause of why this is happening though ☺️ )
Author
Owner

@binki commented on GitHub (Jan 29, 2024):

Unfortunately, the computer in question restarted to install updates so I can no longer reproduce the issue. I found the logs in the Windows.old folder. It is Event ID 10010. It appears that other Store apps were also experiencing the same timeout. However, I had no trouble opening the Store app when this issue was happening. I have had this happen on another computer too. I think the issue goes away upon rebooting, so I am not sure how to recreate it or get it unstuck when it does happen.

I have attached the logs which include a few from Terminal failing to launch as the default terminal and a couple from other apps reporting failures (but I didn’t notice any symptoms for those other errors at the time).

DCOM-server-timeouts.zip

@binki commented on GitHub (Jan 29, 2024): Unfortunately, the computer in question restarted to install updates so I can no longer reproduce the issue. I found the logs in the Windows.old folder. It is Event ID 10010. It appears that other Store apps were also experiencing the same timeout. However, I had no trouble opening the Store app when this issue was happening. I have had this happen on another computer too. I think the issue goes away upon rebooting, so I am not sure how to recreate it or get it unstuck when it does happen. I have attached the logs which include a few from Terminal failing to launch as the default terminal and a couple from other apps reporting failures (but I didn’t notice any symptoms for those other errors at the time). [DCOM-server-timeouts.zip](https://github.com/microsoft/terminal/files/14086545/DCOM-server-timeouts.zip)
Author
Owner

@carlos-zamora commented on GitHub (Jan 31, 2024):

Thanks for filing. If the issue comes back, please capture the logs via Feedback Hub under the "Applications" > "Windows Terminal" category. We'll be closing the issue, but are happy to reopen it if it comes back.

@carlos-zamora commented on GitHub (Jan 31, 2024): Thanks for filing. If the issue comes back, please capture the logs via Feedback Hub under the "Applications" > "Windows Terminal" category. We'll be closing the issue, but are happy to reopen it if it comes back.
Author
Owner

@binki commented on GitHub (Feb 8, 2024):

The issue is back. I have reported it at https://aka.ms/AAp1aok .

@binki commented on GitHub (Feb 8, 2024): The issue is back. I have reported it at https://aka.ms/AAp1aok .
Author
Owner

@binki commented on GitHub (Aug 2, 2024):

And it came back again and is still not resolved with no comment on that feedback.

@binki commented on GitHub (Aug 2, 2024): And it came back again and is still not resolved with no comment on that feedback.
Author
Owner

@xiaotinglian commented on GitHub (Feb 16, 2025):

did you fix this issue? or it fix itself with windows update?
I'm having the same problem now

@xiaotinglian commented on GitHub (Feb 16, 2025): did you fix this issue? or it fix itself with windows update? I'm having the same problem now
Author
Owner

@binki commented on GitHub (Feb 17, 2025):

It still tends to still happen after having my computer on for a few days. An eventual reboot solves it temporarily.

Sometimes I try to avoid commands that open new CMD windows just because I know I'll have to wait for the 30 second timeout. It's a focus derailer/productivity drain.

@binki commented on GitHub (Feb 17, 2025): It still tends to still happen after having my computer on for a few days. An eventual reboot solves it temporarily. Sometimes I try to avoid commands that open new CMD windows just because I know I'll have to wait for the 30 second timeout. It's a focus derailer/productivity drain.
Author
Owner

@xiaotinglian commented on GitHub (Feb 20, 2025):

I realized it might be have something to do with folder or file permission, and something might be corrupted?
what I did was
reinstalled windows 11 23H2,
installed latest windows terminal,
and have no problem,
then I start to set C drive permission will full control to myself, during this process, some pop up messages say some access denied, because it is in process
and this issue returned,
I tried to open ubuntu wsl, cmd, powershell 7, windows powershell,
all command-line tools seems behaving the same way.
but I can directly open windows terminal and open them inside of windows terminal

@xiaotinglian commented on GitHub (Feb 20, 2025): I realized it might be have something to do with folder or file permission, and something might be corrupted? what I did was reinstalled windows 11 23H2, installed latest windows terminal, and have no problem, then I start to set C drive permission will full control to myself, during this process, some pop up messages say some access denied, because it is in process and this issue returned, I tried to open ubuntu wsl, cmd, powershell 7, windows powershell, all command-line tools seems behaving the same way. but I can directly open windows terminal and open them inside of windows terminal
Author
Owner

@binki commented on GitHub (Feb 20, 2025):

@xiaotinglian Does the issue go away for you if you reboot?

That sounds different than the issue I am experiencing. What you are doing may simply not be supported in the first place.

@binki commented on GitHub (Feb 20, 2025): @xiaotinglian Does the issue go away for you if you reboot? That sounds different than the issue I am experiencing. What you are doing may simply not be supported in the first place.
Author
Owner

@xiaotinglian commented on GitHub (Feb 20, 2025):

reboot did not resolve the issue
I do realize, my issue might not be supported here, lol,
not a windows expert, but here's some more info that I found from sfc /scannow, might help?
not sure if this is related, but these log appears in CBS.log couple times

2025-02-19 23:09:58, Info CBS Missing Current State value for package: Microsoft-Windows-Kernel-LA57-FoD-Package31bf3856ad364e35amd64~~10.0.22621.1, force absent so at least it can be re-installed

2025-02-19 23:09:58, Info CBS Failed to get visibility for package: Microsoft-Windows-Kernel-LA57-FoD-Package31bf3856ad364e35amd64~~10.0.22621.1 [HRESULT = 0x80070490 - ERROR_NOT_FOUND]

@xiaotinglian commented on GitHub (Feb 20, 2025): reboot did not resolve the issue I do realize, my issue might not be supported here, lol, not a windows expert, but here's some more info that I found from sfc /scannow, might help? not sure if this is related, but these log appears in CBS.log couple times 2025-02-19 23:09:58, Info CBS Missing Current State value for package: Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.1, force absent so at least it can be re-installed 2025-02-19 23:09:58, Info CBS Failed to get visibility for package: Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.1 [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
Author
Owner

@xiaotinglian commented on GitHub (Mar 17, 2025):

some interesting findings,
I reinstalled PC, with windows 10 22H2, windows terminal works fine there
I did a in-place upgrade to windows 11 22H2, then later update to 23h2, work fine at this point
I used winget upgrade windows terminal to the latest, it works fine as well
then uninstall and reinstall, and the same problem comes back

@xiaotinglian commented on GitHub (Mar 17, 2025): some interesting findings, I reinstalled PC, with windows 10 22H2, windows terminal works fine there I did a in-place upgrade to windows 11 22H2, then later update to 23h2, work fine at this point I used winget upgrade windows terminal to the latest, it works fine as well then uninstall and reinstall, and the same problem comes back
Author
Owner

@xiaotinglian commented on GitHub (Mar 17, 2025):

another thing is windows terminal is not showing in context menu after reinstall
I wonder some setting in registry is not right during installation

@xiaotinglian commented on GitHub (Mar 17, 2025): another thing is windows terminal is not showing in context menu after reinstall I wonder some setting in registry is not right during installation
Author
Owner

@zadjii-msft commented on GitHub (Mar 17, 2025):

then I start to set C drive permission will full control to myself

Just so you know: this is a really, really bad idea. App execution aliases in particular rely on the fact that certain files aren't directly readable by the user, in order to switch to the packaged execution context. In the past, we had a user who tried to give themselves permissions to everything and IIRC, a re-install wouldn't even fix it anymore. It was incredibly bad.

@zadjii-msft commented on GitHub (Mar 17, 2025): > then I start to set C drive permission will full control to myself Just so you know: this is a really, really bad idea. App execution aliases in particular _rely_ on the fact that certain files aren't directly readable by the user, in order to switch to the packaged execution context. In the past, we had a user who tried to give themselves permissions to everything and IIRC, a re-install wouldn't even fix it anymore. It was incredibly bad.
Author
Owner

@xiaotinglian commented on GitHub (Mar 17, 2025):

Totally agree with you, I felt something must be gone wrong with all the permission changes, that's why I decided to reimage my laptop

then I start to set C drive permission will full control to myself

Just so you know: this is a really, really bad idea. App execution aliases in particular rely on the fact that certain files aren't directly readable by the user, in order to switch to the packaged execution context. In the past, we had a user who tried to give themselves permissions to everything and IIRC, a re-install wouldn't even fix it anymore. It was incredibly bad.

@xiaotinglian commented on GitHub (Mar 17, 2025): Totally agree with you, I felt something must be gone wrong with all the permission changes, that's why I decided to reimage my laptop > > then I start to set C drive permission will full control to myself > > Just so you know: this is a really, really bad idea. App execution aliases in particular _rely_ on the fact that certain files aren't directly readable by the user, in order to switch to the packaged execution context. In the past, we had a user who tried to give themselves permissions to everything and IIRC, a re-install wouldn't even fix it anymore. It was incredibly bad.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21146