-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Terminal windows are closed whenever updated from the store #3915
Comments
Actually, the way you're doing it for Visual Studio Code is perfect - why not use the same approach here if possible? :) |
+1 I just lost hours worth of state because of this behavior. |
The other way around is also not good. |
Just having automatic updates install upon next launch would be a perfectly fine behavior. |
Also note, there is a massive difference in these experiences:
please, on behalf of developers everywhere with long build times, consider moving us more and more to #5 |
@DHowett-MSFT I see that you've mentioned this issue from other closed issues but you have not actually commented here regarding the problem or the intention to fix it. I was about to open a new report because this issue also doesn't capture the entire story. But instead I'll post some findings here and hope that you can shed some more light on what the plans are. First, the problem is not just that the console sessions are silently closed when the program automatically updates. I haven't been able to fully trace what set of circumstances causes this, but I've had processes just get orphaned. The only reason I even realize this is that when I go to re-open one of my command line processes, I see that the listening port is still in use and I can't open it. I've then had to go searching through TCPView and Process Explorer to find the orphaned process and kill it. Second, I tried to circumvent all of this by installing the Terminal app via Chocolatey. However, it still gets updated via the Windows Store!? I'm not sure why that would happen if I did not install via the Store. At the very least I would LOVE an option to disable automatic updates. Another solution might be to tie all updates to Terminal to the next Windows reboot cycle? But I think from your comments on other threads this is what you aren't able to do when distributing via the Store. I would also make the recommendation to just not distribute this application on the Windows Store. This is not really an ideal app for that delivery mechanism. This is a power user / developer targeted app, so I would think it would be distributed more like Visual Studio or Visual Studio Code, or even Power Toys. Thanks for your teams work on this app. Unfortunately I am going to have to abandon it until this issue is fixed because I'm losing a lot of time and work every other week when an update is pushed and my long-running processes are lost. |
You've got the critical points down pat. For right now, it's possible to extract the msixbundle (and the architecture-specific msix inside it) and run WindowsTerminal.exe directly. We're not intending on breaking this. 🤞 |
@DHowett Thank you for the quick response! I went ahead and uninstalled my existing copy of Terminal (thereby unlinking it from the Windows Store), and am now running it directly from the exe extracted from the package you referred to. Appears to work the same, although the version number in the about box is listed as 0.11.200512003-release1.0. Hopefully this helps some others who are struggling with the automatic updates. I will keep an eye on the repo so that I can perform my own updates manually. |
So you did not install from the msixbundle available from the 'Releases' page? That's what I just did, and how Store reports the app is 'installed'... so I expect it will still be subject to (auto)updates. Correct? Can you please elaborate on how you got a runnable instance deployed without Store considering it's installed (and thus needs updating)? TIA |
@sba923 You can "unzip" the msixbundle, and then just run the exe from there. I copied the folder to Program Files and added it to my PATH env for extra convenience. I have had no problems with auto-updates since doing it this way. I watch the github project for any releases that have fixes/features that I want. |
Thanks for the tip! I chose not to add the folder to the PATH, because that's not absolutely required (and I have a theory where adding tons of app folders to the PATH would slow down the system...). Something worth mentioning: uninstalling will delete In the "XCOPY-deployed" instance, the HTH |
A bit of research can help you get the info you need in order to be able to perform the necessary tests to confirm/deny your theory so you can start acting on knowledge. Don't act on theories! |
I support your reasoning, but a simple model proves that the more folders you have on the PATH, and the more items therein, the more time it takes to search for a specified EXE or DLL. Of course, the actual measurable impact depends on how much optimization (e.g. caching) has been put into that search algorithm, and of the platform's performance. And that is context and OS-dependent (the articles you refer to pertain to searches done by the bash shell on Unix, my use case is the Windows APIs that rely on EXE/DLL searches on the PATH). My plan is to start a discussion there hoping that some Microsoft people with knowledge about those internals will react to my "theory." |
Seeing this issue as well, its very annoying. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Adds ```xml <uap17:UpdateWhileInUse>defer</uap17:UpdateWhileInUse> ``` To our `Package.Properties` for all our packages. This was added in the September 2023 OS release of Windows 11. Apparently, this just works now? I did update VS, but I don't _think_ that updated the SDK. I have no idea how it updated the manifest definitions. Closes #3915 Closes #6726
Adds ```xml <uap17:UpdateWhileInUse>defer</uap17:UpdateWhileInUse> ``` to our `Package.Properties` for all our packages. This was added in the September 2023 OS release of Windows 11. Apparently, this just works now? I did update VS, but I don't _think_ that updated the SDK. I have no idea how it updated the manifest definitions. Closes #3915 Closes #6726
Adds ```xml <uap17:UpdateWhileInUse>defer</uap17:UpdateWhileInUse> ``` to our `Package.Properties` for all our packages. This was added in the September 2023 OS release of Windows 11. Apparently, this just works now? I did update VS, but I don't _think_ that updated the SDK. I have no idea how it updated the manifest definitions. Closes microsoft#3915 Closes microsoft#6726
Adds ```xml <uap17:UpdateWhileInUse>defer</uap17:UpdateWhileInUse> ``` to our `Package.Properties` for all our packages. This was added in the September 2023 OS release of Windows 11. Apparently, this just works now? I did update VS, but I don't _think_ that updated the SDK. I have no idea how it updated the manifest definitions. Closes #3915 Closes #6726 (cherry picked from commit 077d63e) Service-Card-Id: 91033136 Service-Version: 1.19
On several occasions I've experienced that when I leave my computer for a while and come back, all my terminal windows are gone.
After some investigation I've reached the conclusion that this happens because the app was installed through the Microsoft store, and just received an update.
This is probably fine for your average note taking app or Candy Crush game, but for a terminal with several tabs open that do actual work (and perhaps even long-running (like several days) processes open in remote SSH sessions) this is completely unacceptable.
Is there a way to avoid the terminal being restarted after receiving an update through the Store? A notification would be fine to let me know that I should restart it on the earliest convenient moment, but having it just disappear can in the worst case scenario cost me days of work that will need to be restarted, and in the best case some inconvenience and a few minutes to get back to where I was before...
Luckily a workaround exists: disable apps auto-updating (https://support.microsoft.com/en-us/help/15081/windows-turn-on-automatic-app-updates), but is there really no better way of handling this?
Environment
Steps to reproduce
Do normal everyday work in terminal, wait for an update to arrive.
Expected behavior
A notification to restart the app at my earliest convenience, or that the app continues to run with the old version, and that all new instances are started as the new version (like in Linux, where executables linger on in RAM until closed regardless of whether the file they started from still exist).
Or at the very least that it would notify me that new updates were available, but not install them.
Actual behavior
Terminal windows suddenly disappear with no explanation whatsoever, before I open the Store app and see that it was just now updated...
Sorry if this issue seems a bit salty, but it's really annoying - right up there with getting to the office in the morning to continue where you left off yesterday, only to find out that the PC rebooted automatically to install Windows updates (hint: not cool).
The text was updated successfully, but these errors were encountered: