Skip to content

fix(desktop): mac start:desktop crash from rewritten framework symlinks#3058

Open
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:fix/mac-start-desktop-launcher
Open

fix(desktop): mac start:desktop crash from rewritten framework symlinks#3058
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:fix/mac-start-desktop-launcher

Conversation

@TheIcarusWings

@TheIcarusWings TheIcarusWings commented Jun 12, 2026

Copy link
Copy Markdown

pnpm start:desktop crashed at launch on macOS with repeated "icudtl.dat not found in bundle" and a fatal unusable GPU process.

Root cause: buildMacLauncher copies Electron.app into .electron-runtime/ with cpSync, which by default rewrites the framework's relative symlinks (such as Resources -> Versions/Current/Resources) into absolute paths pointing back into node_modules. Electron's sandboxed helper processes cannot follow symlinks that escape the app bundle, so ICU data lookup fails and every helper crashes. Dev mode is unaffected because it execs the original bundle; only the production start path runs the copy.

Fix: pass verbatimSymlinks: true so the staged bundle stays self-contained, and bump LAUNCHER_VERSION so previously staged bundles with rewritten symlinks are invalidated and re-copied instead of being reused by the metadata check.

Verified by reproducing the crash with a minimal Electron app against the broken copied bundle, then confirming pnpm build && pnpm start:desktop launches cleanly after the fix (window up, GPU and network helpers alive, no ICU errors). Also verified the version bump re-stages an existing stale bundle without manual deletion.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6c5a3bb6-dfe5-443e-a07b-83ccbdcb67bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jun 12, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This is a targeted bug fix that adds verbatimSymlinks: true to preserve Electron framework symlinks during Mac app bundle copying, preventing a crash in sandboxed helper processes. The change is self-contained with clear intent and minimal risk.

You can customize Macroscope's approvability policy. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 12, 2026
buildMacLauncher copies Electron.app with cpSync, which rewrites the
framework's relative symlinks (Resources -> Versions/Current/Resources)
into absolute paths pointing back into node_modules. Sandboxed helper
processes cannot follow symlinks that escape the app bundle, so
`pnpm start:desktop` crashed on macOS with repeated
"icudtl.dat not found in bundle" and a fatal unusable GPU process.
Pass verbatimSymlinks to keep the bundle self-contained.

Also bump LAUNCHER_VERSION so previously staged bundles with rewritten
symlinks are invalidated and re-copied instead of being reused by the
metadata check.
@TheIcarusWings TheIcarusWings force-pushed the fix/mac-start-desktop-launcher branch from 43d6758 to bd0555e Compare June 12, 2026 13:58
@macroscopeapp macroscopeapp Bot dismissed their stale review June 12, 2026 13:58

Dismissing prior approval to re-evaluate bd0555e

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant