Root cause: On Apple Silicon macOS, the Camoufox browser binary
inherits com.apple.quarantine from npm download. When camoufox-browser
launches it headlessly, Gatekeeper silently kills the process with
SIGKILL (exitCode=null, signal=SIGKILL) before it can run.
Fix:
1. remove_macos_quarantine() — runs 'xattr -dr com.apple.quarantine'
on the Camoufox cache directory after every fetch and on every
subsequent startup (in case cache was from a prior npx run)
2. check_known_errors() — detects 'sigkill' in daemon stderr and
shows the exact fix command to the user
3. Runs quarantine removal in TWO places:
- Immediately after camoufox-js fetch downloads the binary
- Always, even when binary already exists in cache