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

[Bug]: clash-verge-rev fail to uninstall for its service #14495

Open
3 tasks done
mslxl opened this issue Dec 2, 2024 · 2 comments · May be fixed by #14494
Open
3 tasks done

[Bug]: clash-verge-rev fail to uninstall for its service #14495

mslxl opened this issue Dec 2, 2024 · 2 comments · May be fixed by #14494
Labels

Comments

@mslxl
Copy link

mslxl commented Dec 2, 2024

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

clash-verge-rev

Expected/Current Behaviour

Fail to uninstall clash-verge-rev by executing scoop uninstall clash-verge-rev for clash-verge-service.exe is running.

This program was registered as system service, it will be startup followed by system.

ERROR Couldn't remove '~\scoop\apps\clash-verge-rev\2.0.2'; it may be in use.

Steps to Reproduce

PS C:\Users\lnslf\sources\Extras> scoop uninstall clash-verge-rev   
Uninstalling 'clash-verge-rev' (2.0.2).
Running uninstaller script...done.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Clash Verge.lnk
Unlinking ~\scoop\apps\clash-verge-rev\current
ERROR Couldn't remove '~\scoop\apps\clash-verge-rev\2.0.2'; it may be in use.

Possible Solution

Run resources/uninstall-service.exe first would solve it.

Scoop and Buckets Version

PS C:\Users\lnslf\sources\Extras> scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)

'main' bucket:
9b87efb13 (HEAD -> master, origin/master, origin/HEAD) [email protected]: Remove 'kotlin-dce-js.bat' (#6347)

'extras' bucket:
19c763fc1 (HEAD -> master, origin/master, origin/HEAD) clash-verge-rev: Update to Version 2.0.2 (#14460)

'versions' bucket:
7b23a1581 (HEAD -> master, origin/master, origin/HEAD) vlc-nightly-ucrt-llvm: Update to version 20241202

'nonportable' bucket:
47ca7d62 (HEAD -> master, origin/master, origin/HEAD) 10x-np: Update to version 1.0.241

'java' bucket:
488d52dd (HEAD -> master, origin/master, origin/HEAD) temurin8-nightly-jre: Update to version 8.0.442-4.0.202411291318

'mslxl' bucket:
72e4256 (HEAD -> master, origin/master, origin/HEAD) baidu-netdisk: Update to version 7.45.2.1

Scoop Config

PS C:\Users\lnslf\sources\Extras> scoop config

last_update           : 12/2/2024 1:15:21 PM
scoop_repo            : https://github.com/ScoopInstaller/Scoop
scoop_branch          : master
aria2-enabled         : True
aria2-options         : --async-dns=false --all-proxy='http://127.0.0.1:7897'  --retry-wait=5
aria2-warning-enabled : False

PowerShell Version

PS C:\Users\lnslf\sources\Extras> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

@mslxl mslxl added the bug label Dec 2, 2024
@mslxl mslxl linked a pull request Dec 2, 2024 that will close this issue
1 task
@lingkerio
Copy link

I suspect the issue is related to the requirement for administrative privileges when installing or uninstalling in service mode. I was able to successfully uninstall by adding sudo before running scoop uninstall clash-verge-rev.

If you don't have sudo available, you can first install gsudo by running scoop install gsudo.

Hope this helps!

@mslxl
Copy link
Author

mslxl commented Dec 2, 2024

I suspect the issue is related to the requirement for administrative privileges when installing or uninstalling in service mode. I was able to successfully uninstall by adding sudo before running scoop uninstall clash-verge-rev.

If you don't have sudo available, you can first install gsudo by running scoop install gsudo.

Hope this helps!

Thank you for your help.

I found it was caused by a clash-verge-services.exe being occupied, which was registered as system services to gain high privileges. Meanwhile, the service would not stop after the main process terminated. I referred to the old version of the JSON file and found the old one invokes uninstall-service.exe, so I tried executing sudo ./resources/uninstall-services.exe first and then running scoop uninstall clash-verge-rev manually. It works.

According to the above information, I added the uninstall script snippet back and tested it on my machine. You can see my changes in the second commit of #14494.

In addition, I didn't add the installation script of the service, which will be installed when the program starts first time automatically now. So I think it's meaningless to install the service with the script.

I guess that maybe you forget to update, this problem only occurred on the latest version. Unfortunately, add prefix sudo simply when uninstall does not work 😢.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants