Homebrew/homebrew-cask · warning
Unable to forcibly close VCam.app
Error message
Unable to forcibly close VCam.app
What it means
Printed by the terminate_process step in vcam's postflight_steps (Casks/v/vcam.rb:32). VCam's .pkg postinstall runs `open /Applications/VCam/VCam.app`, so Homebrew follows with `/usr/bin/pkill -f /Applications/VCam/VCam.app` up to 3 times, 1 second apart — note the nested path, because this app installs inside a /Applications/VCam folder (matching the `delete: /Applications/VCam` in the uninstall stanza). pkill exits non-zero when no live process's command line contains that exact nested path; after the last failed attempt Homebrew prints this failure_message as a `Warning:`. With `must_succeed: false` the step never fails the install.
Source
Thrown at Casks/v/vcam.rb:32
depends_on :macos
pkg "VCam_#{version}.pkg"
postflight_steps do
# Description: Ensure console variant of postinstall is non-interactive.
# This is because `open /Applications/VCam/VCam.app` is called from the
# postinstall script of the package and we don't want any user intervention there.
terminate_process(
"/Applications/VCam/VCam.app",
match: :full,
attempts: 3,
must_succeed: false,
notices: [
"The VCam package postinstall script launches the VCam app",
"Attempting to close VCam.app to avoid unwanted user intervention",
],
failure_message: "Unable to forcibly close VCam.app",
)
end
uninstall quit: "ai.vcam.desktop",
pkgutil: [
"camera-helper",
"electron-app",
"vcam.ai-uninstall",
],
delete: "/Applications/VCam"
zap trash: [
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/ai.vcam.desktop.sfl*",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.splitmedialabs.camerahelper.sfl*",
"~/Library/Application Support/VCam.ai",
"~/Library/Preferences/ai.vcam.desktop.plist",
"~/Library/Saved Application State/ai.vcam.desktop.savedState",
]View on GitHub (pinned to 8587086220)
Solutions
- If brew completed, ignore the warning (`must_succeed: false`); quit any leftover app with `pkill -f /Applications/VCam/VCam.app`.
- Quit VCam before the operation (`osascript -e 'quit app "VCam"'`), then re-run `brew reinstall --cask vcam`.
- For older copies running from a different path, quit them too: `pkill -f VCam.app` (broader match) before installing.
- Verify with `pgrep -fl VCam` which path is actually running; if the vendor moved the bundle, update the cask path (`brew edit --cask vcam`) and open a PR.
Example fix
# before brew upgrade --cask vcam # Warning: Unable to forcibly close VCam.app # after: quit the camera app (any install location), then upgrade osascript -e 'quit app "VCam"' || pkill -f 'VCam.app' brew upgrade --cask vcam
Defensive patterns
Strategy: validation
Validate before calling
# Quit VCam wherever it runs from (old releases used a non-nested path): osascript -e 'quit app "VCam"' 2>/dev/null || pkill -f 'VCam.app' 2>/dev/null || true brew reinstall --cask vcam
Try / catch
begin
Homebrew::SystemCommand.run!("/usr/bin/pkill", args: ["-f", "/Applications/VCam/VCam.app"])
rescue ErrorDuringExecution
# No command line contained the nested path: app not running or running
# from an older non-nested location. Non-fatal by design.
warn "Unable to forcibly close VCam.app"
end Prevention
- Quit VCam before brew operations on the cask, including older copies at non-nested paths.
- Remember the cask targets the nested /Applications/VCam/VCam.app path; old releases at /Applications/VCam.app will not match.
- Treat the warning as advisory (must_succeed: false); verify with `brew list --cask vcam`.
- Maintainers: re-check the nested path after vendor layout changes and test install with the app both running and closed.
When it happens
Trigger: `brew install|upgrade|reinstall --cask vcam` where all three pkill attempts miss: the app never launched (headless install; postinstall `open` failed), the launch exceeded the ~3s window, or an older VCam release running from a non-nested path (e.g. /Applications/VCam.app) does not match the cask's nested pattern.
Common situations: Upgrades from an older VCam version whose bundle lived directly in /Applications rather than in the VCam folder; SSH/CI installs with no GUI session; slow virtual-camera launch racing the retry window; vendor changing the install layout.
Related errors
- Unable to forcibly close BEIDToken.app
- Unable to forcibly close BlurScreen.app
- Unable to forcibly close GameMaker LTS #{version.major}.app
- Unable to forcibly close GameMaker.app
- Unable to forcibly close TeamViewer
AI-assisted analysis of Homebrew/homebrew-cask@8587086220 (2026-08-21).
Data as JSON: /api/errors/9f8d5e289b2fdc92.
Report an issue: GitHub.