Uninstall does not terminate running desktop app process, blocking reinstall
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- build-system, desktop
Hướng nghiên cứu
Bắt đầu trong Installer/Program.cs và xem xét vòng đời ServiceInstaller hiện có của dự án MSI cũng như việc sử dụng WixExtension.Util. Xây dựng hoặc chạy quy trình gỡ cài đặt và cài đặt lại khi Coder Desktop đang chạy, sau đó xác minh rằng cả các tiến trình desktop và VPN đều được dừng trong quá trình gỡ cài đặt, đồng thời ứng dụng khởi chạy bình thường sau khi cài đặt lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Uninstalling Coder Desktop via the Control Panel "Uninstall a program" wizard completes successfully, but the Coder Desktop.exe process (and the VPN service background process) remain running in Task Manager. This causes reinstallation to silently fail — the app never launches again.
Root Cause
The MSI installer has no mechanism to close the running desktop app process during uninstall. The ServiceInstaller manages the Windows service lifecycle (StopOn = InstallUninstall_Wait, RemoveOn = Uninstall_Wait), but there is no corresponding WixCloseApplication or custom action to terminate the user-space desktop app.
After uninstall, the old Coder Desktop.exe process continues running and holds the AppInstance singleton key (Coder.Desktop.App via AppInstance.FindOrRegisterForKey). On reinstall and relaunch:
- The new instance calls
AppInstance.FindOrRegisterForKey("Coder.Desktop.App") - It finds the old (zombie) instance, so
mainInstance.IsCurrentisfalse - It calls
RedirectActivationToAsyncto the old instance - The old instance's
OnActivatedreceives aLaunchactivation kind, which hits the unhandleddefaultcase - The warning
activation for "Launch", which is unhandledis logged and nothing else happens - The new instance exits, and the app appears to never start
Steps to Reproduce
- Install Coder Desktop and launch it (the app runs in the system tray)
- Uninstall via Control Panel → "Uninstall a program"
- Observe in Task Manager that
Coder DesktopandCoder VPN Servicebackground processes are still running - Reinstall Coder Desktop and launch it
- The app never appears — no tray icon, no window
- Check the logs for:
[WRN] activation for "Launch", which is unhandled
Expected Behavior
- The uninstaller should terminate the running
Coder Desktop.exeprocess before removing files - The VPN service should be fully stopped and removed
- After reinstall, the app should launch normally
Suggested Fix
Add a WixCloseApplication element (from WixExtension.Util) to the MSI project targeting Coder Desktop.exe. This will gracefully close the running app process during uninstall/upgrade before files are removed. For example in Installer/Program.cs:
project.Include(WixExtension.Util);
project.WixSourceGenerated += doc =>
doc.FindFirst("Package").AddElement(
WixExtension.Util.ToXName("CloseApplication"),
"Target=Coder Desktop.exe; CloseMessage=yes; RebootPrompt=no");
Created on behalf of @uzair-coder07
- Ngôn ngữ chính
- C#
- Star
- 29
- Fork
- 12
- Merge trung bình
- 4 giờ 15 phút
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/coder-desktop-windows
-
CoderVPN Unsigned Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
coder/coder-desktop-windows#179 · 3 bình luận ·
-
bug coder-desktop networking
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
coder/coder-desktop-windows#177 · 2 bình luận ·
-
bug coder-desktop
coder/coder-desktop-windows#171 · 1 bình luận · 1 người được giao ·
-
bug github-sync
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
coder/coder-desktop-windows#170 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
coder/coder-desktop-windows#151 ·
Tất cả issue của coder/coder-desktop-windows
Issue tương tự
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
microsoft/vscode-azurefunctions#5197 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
microsoft/microsoft-ui-reactor#1274 ·