mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: grant macOS screen recording TCC permission before recording
Inserts kTCCServiceScreenCapture entries for ffmpeg and bash into TCC.db before starting avfoundation recording. This prevents the blocking permission dialog that was obstructing QA sessions on macOS. Tries macOS 14+ schema first (17 columns), falls back to 13- (13 columns). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
.github/workflows/pr-qa.yaml
vendored
16
.github/workflows/pr-qa.yaml
vendored
@@ -139,6 +139,22 @@ jobs:
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install ffmpeg
|
||||
|
||||
- name: Grant screen recording permission (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
# Grant kTCCServiceScreenCapture to ffmpeg and bash so avfoundation
|
||||
# recording works without the blocking permission dialog.
|
||||
FFMPEG_PATH=$(which ffmpeg)
|
||||
echo "Granting screen recording permission to: $FFMPEG_PATH"
|
||||
# macOS 14+ (Sonoma/Sequoia) TCC.db schema has 17 columns
|
||||
for BIN in "$FFMPEG_PATH" "/bin/bash"; do
|
||||
sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" \
|
||||
"INSERT OR REPLACE INTO access VALUES('kTCCServiceScreenCapture','${BIN}',1,2,0,1,NULL,NULL,0,'UNUSED',NULL,0,$(date +%s),NULL,NULL,NULL,NULL);" 2>/dev/null \
|
||||
|| sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" \
|
||||
"INSERT OR REPLACE INTO access VALUES('kTCCServiceScreenCapture','${BIN}',1,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,$(date +%s));" 2>/dev/null \
|
||||
|| echo "Warning: Could not grant TCC permission to ${BIN}"
|
||||
done
|
||||
|
||||
- name: Start recording (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user