fix(release): sign CEF framework as single bundle on macOS#937
Conversation
The post-build re-sign step walked into Chromium Embedded Framework.framework and signed each *.dylib / *.so individually with hardened-runtime + the sidecar entitlements plist, then re-sealed the framework. This corrupted the framework's _CodeSignature manifest. At runtime CEF's SecCodeCheckValidity self-check failed with -67030 (errSecCSReqFailed) — process_requirement.cc could not derive a validation category, helper processes could not host the URL request context or remote debugger, and every embedded webview (Telegram, WhatsApp, Slack, Discord, ...) stayed on about:blank in CI-built bundles. Local cargo tauri build worked because the vendored CEF-aware bundler signs the framework as one unit. Sign each *.framework as a single bundle with no --entitlements (frameworks do not carry entitlements; codesign seals nested libs via CodeResources). Sign each Helper.app as a bundle and let codesign handle its inner binary instead of pre-signing the Mach-O separately.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe macOS signing script now uses a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
CI-built macOS
.appbundles ship CEF + helpers but every embedded webview (Telegram, WhatsApp, Slack, Discord, ...) silently stays onabout:blank. Locally-built.appworks fine.Repro: download
OpenHuman.appfrom a release run, launch it, watch stderr:-67030=errSecCSReqFailed. Chromium callsSecCodeCheckValidity()against its own running process at startup; when that fails, helper processes can't host the URL request context or the remote debugger, so embedded webviews never navigate.Root cause is in
scripts/release/sign-and-notarize-macos.sh. The post-build re-sign step walks intoChromium Embedded Framework.frameworkand signs each*.dylib/*.soindividually with hardened-runtime + the sidecar entitlements plist, then re-seals the framework as a whole. That corrupts the framework's_CodeSignature/CodeResourcesmanifest — inner libs end up with their own designated requirement that doesn't match the categories Chromium expects inprocess_requirement.cc.Local
cargo tauri build(vendored CEF-aware CLI) signs the framework as a single bundle, which is the Apple-correct way:codesignrecursively seals nested libs via the framework's_CodeSignature. That's why the local build passes the runtime self-check and the CI build doesn't.Fix
*.frameworkas a single bundle, no--entitlements(frameworks don't carry entitlements).Helper.appas a bundle and letcodesignhandle the inner binary, instead of pre-signing the Mach-O separately and then re-signing the bundle around it.Out of scope (follow-up)
The shared
entitlements.sidecar.plistis reused for the main.app, every helper, and the sidecar. It's broad enough to work but conceptually wrong (GPU/Plugin/Alerts helpers don't needallow-jit; the main app shouldn't share the sidecar plist). Splitting per-target plists is hygiene, not the bug — leaving for a follow-up to keep this change focused.Test plan
.appartifact, launch it, confirm noprocess_requirement.ccerrors in stderrweb.telegram.orgactually loads (CDP port 19222 reachable, page leavesabout:blank)codesign --verify --deep --strict --verbose=2 OpenHuman.apppassesspctl -a -vv -t exec OpenHuman.appreports notarizedxcrun stapler validate OpenHuman.appsucceedsSummary by CodeRabbit