Skip to content

fix(macos): strip quarantine before bootstrapping the broker service - #207

Open
neroshooter wants to merge 1 commit into
LizardByte:masterfrom
neroshooter:claude/bootstrap-installation-error-96b769
Open

neroshooter wants to merge 1 commit into
LizardByte:masterfrom
neroshooter:claude/bootstrap-installation-error-96b769

Conversation

@neroshooter

@neroshooter neroshooter commented Oct 24, 2026 •

Copy link
Copy Markdown

Description

Installing from a DMG downloaded with Safari or Chrome fails at the end of Install libvirtualhid.command:

Bootstrap failed: 5: Input/output error

The apps are copied to /Applications, but the broker service never starts. Files on a mounted disk image inherit the image's com.apple.quarantine attribute. install and ditto keep it, so /Library/LaunchDaemons/dev.lizardbyte.app.libvirtualhid.plist ends up quarantined and launchctl bootstrap system rejects it.

This PR removes com.apple.quarantine (with xattr -dr) from everything the installer copies, before launchctl bootstrap:

  • VirtualHIDBroker.app and VirtualHIDControl.app, right after ditto and before the signature checks;
  • the LaunchDaemon plist;
  • the installed /usr/local headers, static library, license tool, CMake package, and license texts, when present.

The installer already checks the bundled apps with codesign --verify --deep --strict before and after copying them, and the DMG itself is notarized and stapled, so dropping the download marker does not skip any signature check.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

Manual validation on macOS 27.0.1 (Apple Silicon), using the current release DMG (libvirtualhid-macOS-universal.dmg, SHA-256 6ebe73f6…236a871):

  • Reproduced: after a Safari download, the installer failed with Bootstrap failed: 5: Input/output error. xattr -l showed com.apple.quarantine on the installed plist and on both apps, and launchctl print system/dev.lizardbyte.app.libvirtualhid reported the service as missing.
  • Confirmed the cause: after a full uninstall, I downloaded the same DMG again with Chrome, removed its quarantine attribute before mounting, and ran the unmodified installer. Bootstrap succeeded and launchctl print reported state = running.
  • Script checks: bash -n scripts/macos/install.command passes. xattr -dr com.apple.quarantine removes the attribute from a bundle and exits 0 on files and directories that do not have it, so the script stays compatible with set -e for DMGs opened without quarantine.

Not run: I could not build a signed DMG containing this change (that needs the Developer ID identity and the virtual HID provisioning profile), so the patched installer has not been tested end to end from a quarantined DMG. No automated test was added because install.command requires sudo, launchctl, and a mounted signed image, and the repository has no harness for it.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Claude Code helped diagnose the failed install, write the fix, and draft this description. I reproduced the failure and confirmed the workaround on my own Mac.

Generated with Claude Code (Claude Opus 5.5, low thinking level).

🤖 Generated with Claude Code

Files copied from a browser-downloaded DMG inherit com.apple.quarantine.
launchd refuses the quarantined LaunchDaemon plist, so the installer
failed with "Bootstrap failed: 5: Input/output error". Remove the
attribute from the installed apps, plist, and /usr/local files before
bootstrapping the service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Oct 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants