镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(macOS): add NSBluetoothAlwaysUsageDescription so BLE CLI tools don't SIGABRT - #16686

Open
terra-alex wants to merge 1 commit into
warpdotdev:masterfrom
terra-alex:bluetooth-usage-description
Open

terra-alex wants to merge 1 commit into
warpdotdev:masterfrom
terra-alex:bluetooth-usage-description

Conversation

@terra-alex

Copy link
Copy Markdown

Closes #16685

Supersedes #14551, which was auto-closed while the CLA and issue link were pending. Same one-line change, rebased on current master.

Problem

macOS attributes a child process's TCC privacy request to the responsible process — the terminal. When a CLI launched inside Warp calls CoreBluetooth, macOS looks in Warp's Info.plist for NSBluetoothAlwaysUsageDescription; when it's absent the child is killed with SIGABRT:

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key…

and the user has no way to grant Bluetooth access. This breaks every BLE tool run from Warp (bleak/pyobjc scripts, BLE CLIs, etc.).

script/update_plist already declares the sibling TCC usage strings — AppleEvents, Camera, Microphone, Contacts, Calendars, Reminders, Location, PhotoLibrary. Bluetooth is the one omission.

Fix

One line, matching the existing pattern:

plutil -insert NSBluetoothAlwaysUsageDescription -string "A program in Warp wants to use Bluetooth." "$WARP_PLIST_PATH"

Why the string alone is sufficient (no entitlement change)

iTerm2 fixes the identical issue with the string alone (added in iTerm2 3.5.0). Its code-signing posture is the same as Warp's — Developer ID + hardened runtime, shipping com.apple.security.device.camera and com.apple.security.device.audio-input but no com.apple.security.device.bluetooth — and BLE tools run from it without SIGABRT. The hardened-runtime device entitlement governs the entitled process's own direct access; the hosted CLI is a separate process and only needs the responsible app's usage string. So script/Entitlements.plist does not need to change.

The string is inert until a hosted process actually calls CoreBluetooth — it does not make Warp itself request Bluetooth on launch.

References

Manual testing

A controlled A/B on macOS 26.4.1 (Apple Silicon). There are two minimal app bundles, identical except for this one Info.plist key. Each spawns a child shell that runs a CoreBluetooth script, the same responsible-process relationship as Warp → shell → CLI. The script creates a CBCentralManager and runs the run loop for 4 s.

Bundle NSBluetoothAlwaysUsageDescription Child result
BLEProbeNoKey.app absent killed, exit 134 (SIGABRT). Crash report namespace: TCC, "must contain an NSBluetoothAlwaysUsageDescription key", the same report Warp produces today
BLEProbeWithKey.app present runs normally, CBManagerState 5 (poweredOn), exit 0

The same script under the current Warp release (v0.2026.10.21.08.25.02) is killed with the identical TCC termination (responsibleProc: "stable"). Under iTerm2, which ships this key, it runs. That confirms the usage string alone is what TCC requires; no entitlement change is needed.

I have not built Warp itself from source for this check. The change is a single plutil -insert line identical in form to the ten existing ones above it.

@cla-bot

cla-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @terra-alex on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Oct 29, 2026
@terra-alex

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Oct 29, 2026
@cla-bot

cla-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bluetooth CLI tools are killed with SIGABRT: Info.plist missing NSBluetoothAlwaysUsageDescription

1 participant