Skip to content

Fix macOS browser sources when obs64 runs outside an .app - #1807

Merged
summeroff merged 2 commits into
stagingfrom
fix/mac-cef-main-bundle-path
Oct 15, 2026
Merged

summeroff merged 2 commits into
stagingfrom
fix/mac-cef-main-bundle-path

Conversation

@summeroff

Copy link
Copy Markdown
Contributor

Problem: on macOS, when obs64 runs with no .app ancestor (Desktop e2e and dev runs from node_modules), browser sources are created but never load. CEF helpers start and exit immediately: obs64 and the helpers resolve different outer bundles, so their Mach-port rendezvous names don't match.

Change: in that layout only, obs64 passes --main-bundle-path=<osn>/Frameworks/obs64 Helper.app to CEF via obs_set_cmdline_args. Packaged Desktop always has an .app ancestor, so it's unaffected. Adds a browser-source load/refresh test against a local server.

Evidence (#1805, macOS arm64 + x86_64): unbundled without the fix → 0/2; with the fix → 2/2, helpers alive. Windows unchanged.

🤖 Generated with Claude Code

Without an .app ancestor, obs64 and its CEF helpers resolve different outer bundles, so helpers fail Mach-port rendezvous and exit; browser sources never load. Passing --main-bundle-path makes them agree.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Test setup or teardown failures can leave the HTTP fixture listening because cleanup is not protected.

1 open finding
What changed in this PR

Fixes macOS browser-source startup when obs64 runs outside an .app, while preserving bundled behavior.

Changes:

  • Sets CEF’s main bundle path to the helper app for unbundled execution.
  • Adds local-server tests for browser-source loading, script execution, and refresh.
File Description
tests/​osn-tests/​src/​test_browser_source_load.ts Adds browser loading and refresh tests with diagnostics.
obs-studio-server/​source/​main.cpp Sets the CEF bundle argument for unbundled macOS execution.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/osn-tests/src/test_browser_source_load.ts Outdated
Setup failure leaves obs undefined and any teardown error previously skipped server.close(), leaking the listener.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@summeroff
summeroff merged commit b88ad5e into staging Oct 15, 2026
11 checks passed
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.

3 participants