Make OBS startup and connection more robust - #13
Open
Broyojo wants to merge 2 commits into
Open
Conversation
- Retry the OBS websocket connection with a readiness probe, since OBS may still be starting up when DuckTrack launches it - Launch OBS via `open -a` on macOS so permission prompts work, and quit it gracefully via AppleScript (terminating the `open` process does nothing) - Continue with the current OBS profile instead of crashing when the computer_tracker profile can't be created or switched to - Show a one-time notice on macOS explaining the required permissions Adapted from the huyouare/DuckTrack fork. Co-authored-by: Jesse Hu <3528340+huyouare@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Hardens the OBS integration against the most common failure modes, especially on macOS:
OBSClientpreviously calledobs.ReqClient()once and crashed if OBS was still starting up (which it usually is, since DuckTrack launches it). Now retries up to 5 times, verifying withget_version().open -a OBS— launching the binary directly bypasses the normal app launch path, which breaks Screen Recording permission prompts. Correspondingly,close_obsnow quits OBS via AppleScript on macOS (terminating theopenprocess did nothing) with akillallfallback.computer_trackerprofile can't be created or switched to, continue with the current profile and warn, instead of crashing. Profile restore on stop is now guarded the same way.Notes
Builds on #12 (its commit is included here) — merge that first.
Credit
Adapted from the huyouare/DuckTrack fork by @huyouare, which debugged these failure modes on modern macOS. This PR takes the connection/launch/profile robustness ideas from that fork, reimplemented to match the existing code style (the fork's fallback input monitor and logging overhaul are intentionally not included, since the sentinel events it injects would break the
events.jsonlschema that downstream consumers rely on).🤖 Generated with Claude Code