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

Uninstalling OBS leaves behind virtual camera #175497

Open
5 of 6 tasks
ShadowJonathan opened this issue Jun 1, 2024 · 11 comments
Open
5 of 6 tasks

Uninstalling OBS leaves behind virtual camera #175497

ShadowJonathan opened this issue Jun 1, 2024 · 11 comments
Labels
upstream Issue which needs to be resolved by the upstream project.

Comments

@ShadowJonathan
Copy link
Contributor

Verification

Description of issue

When uninstalling the obs cask, it leaves behind the "virtual camera" extension.

I've found a comment here which references this, but when uninstalling OBS via finder ("move to bin"), it correctly uninstalls the system extension.

Is it possible for homebrew to perform a similar function, or otherwise point the user to this fact?

Command that failed

brew uninstall --cask obs

Output of command with --verbose --debug

N/A

Output of brew doctor and brew config

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  arduino
  schildichat

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]
  neofetch
  [email protected]
  python-charset-normalizer
  python-idna
  python-psutil
  python-requests
  python-urllib3
  [email protected]

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-cask-versions
  Homebrew/homebrew-cask-fonts
Untap them with `brew untap`.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python-idna
  ipfs
  python-requests
  glib
  python-urllib3
  numpy
  hyfetch
  platformio
  uvicorn
  python-charset-normalizer

Warning: You have uncommitted modifications to Homebrew/homebrew-core.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /opt/homebrew/Library/Taps/homebrew/homebrew-core && git stash -u && git clean -d -f

Uncommitted files:
   M Formula/p/[email protected]

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
  git -C $(brew --repo shadowjonathan/cask) checkout master

$ brew config
HOMEBREW_VERSION: 4.3.2-60-gc6368be
ORIGIN: https://github.com/Homebrew/brew
HEAD: c6368bea8a1e038e77d49ed13bba33c5bc2f8ce6
Last commit: 9 hours ago
Core tap HEAD: d904406925ed37ccce85afced22a079adc71b780
Core tap last commit: 3 months ago
Core tap JSON: 01 Jun 08:56 UTC
Core cask tap HEAD: 48d18e314b6e164935e59962443fec6cb8bfb3bc
Core cask tap last commit: 3 months ago
Core cask tap JSON: 01 Jun 08:56 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.MFcLn7quZx/org.xquartz:0
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.2 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.44.0 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false

Output of brew tap

$ brew tap
alexanderwillner/tap
gromgit/fuse
homebrew/cask
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core
homebrew/services
marcus-crane/tap
mistertea/et
shadowjonathan/cask
teamookla/speedtest
@SMillerDev
Copy link
Member

Sounds like #170602

@ShadowJonathan
Copy link
Contributor Author

That issue left out this specific request; I'd like to make an issue to find a way to ask the system to remove those system extensions, possibly by doing something similar to what Finder does, to uninstall it.

@SMillerDev
Copy link
Member

Regarding the system extension, as far as I know this is a MacOS system-level limitation, and this would be the same case were you to remove the application the usual way (it is not a Homebrew-specific limitation).

So it doesn't seem like that's possible without changes in macOS

@miccal
Copy link
Member

miccal commented Jun 15, 2024

@ShadowJonathan can I confirm that you are referring to the system extension com.obsproject.obs-studio.mac-camera-extension as listed in the output of the command systemextensionsctl list?

If you are, can you please provide the output of the command systemextensionsctl list?

@ShadowJonathan
Copy link
Contributor Author

@miccal i have already uninstalled it, but i can describe the output i had after doing brew uninstall, which listed the extension normally, persisted that across a reboot, with no mention of "will uninstall next reboot", which it did when i uninstalled OBS studio via finder

@miccal
Copy link
Member

miccal commented Jun 15, 2024

Thanks @ShadowJonathan. Did you remove it by running systemextensionsctl uninstall after disabling SIP?

@ShadowJonathan
Copy link
Contributor Author

No, I did not and do not want to disable SIP.

This is why the only uninstall path being via Finder was very odd and unintuitive to me.

@miccal
Copy link
Member

miccal commented Jun 15, 2024

I am not sure what we can do here on the brew side.

My (limited) knowledge of system extensions comes from dealing with them via three apps: Little Snitch, OBS and Microsoft Defender.

Now, both Little Snitch and Microsoft Defender implement a proper deactivationRequest so that the system extension is removed more-or-less regardless of how the .app bundles are removed.

However, OBS does not implement a proper deactivationRequest, which means that the system extension is only removed if the .app bundle is manually removed by dragging it to the trash, which initiates the removal of the system extension.

Here is the problem: for reasons I do not understand (yet), removing the .app bundle via, say, an rm command from the Terminal, does not initiate the removal of the system extension.

So, until this issue is resolved by Apple:

|-> systemextensionsctl uninstall
At this time, this tool cannot be used if System Integrity Protection is enabled.
This limitation will be removed in the near future.
Please remember to re-enable System Integrity Protection!

I do not think we can do anything via brew.

(Note that systemextensionsctl uninstall has been this way since macOS 10.15 Catalina, released in 2019: I think Apple's definition of the "near future" is not quite the same as ours!)

@ShadowJonathan
Copy link
Contributor Author

ShadowJonathan commented Jun 16, 2024

Are Little Snitch and Microsoft Defender installable and (completely) uninstallable via brew? System extensions and all?


Would it be useful for me to file a bug report with OBS Studio, and then link back to here? (To keep this issue open until that is resolved, so that there is a proper chain of dependencies.)

I think that this is a reasonable request for them, I have never even heard of that possibility (to uninstall via deactivationRequest), so it is possible OBS Studio doesn't as well, and if we request this, they might implement it, and OBS Studio would be properly (and neatly) completely uninstallable via brew.

(Though I'm unsure what extra things need to be added to it after they implement deactivationRequest)

Does this sound reasonable?

@miccal
Copy link
Member

miccal commented Jun 16, 2024

Are Little Snitch and Microsoft Defender installable and (completely) uninstallable via brew? System extensions and all?

Microsoft Defender: yes.

Little Snitch: unsure, as I have never uninstalled it (but brew update works fine).

Would it be useful for me to file a bug report with OBS Studio, and then link back to here? (To keep this issue open until that is resolved, so that there is a proper chain of dependencies.)

I think that this is a reasonable request for them, I have never even heard of that possibility (to uninstall via deactivationRequest), so it is possible OBS Studio doesn't as well, and if we request this, they might implement it, and OBS Studio would be properly (and neatly) completely uninstallable via brew.

(Though I'm unsure what extra things need to be added to it after they implement deactivationRequest)

Does this sound reasonable?

There is already an open issue about this over at the OBS GitHub page: obsproject/obs-studio#9714.

@ShadowJonathan
Copy link
Contributor Author

Thanks! I've mentioned this option there, there's a large chance they haven't heard of it :)

@miccal miccal added the upstream Issue which needs to be resolved by the upstream project. label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issue which needs to be resolved by the upstream project.
Projects
None yet
Development

No branches or pull requests

3 participants