Skip to content

fix(cli): preserve macOS Chrome symlinks during install#1058

Open
niieani wants to merge 1 commit intovercel-labs:mainfrom
niieani:codex/preserve-macos-chrome-symlinks-install
Open

fix(cli): preserve macOS Chrome symlinks during install#1058
niieani wants to merge 1 commit intovercel-labs:mainfrom
niieani:codex/preserve-macos-chrome-symlinks-install

Conversation

@niieani
Copy link
Copy Markdown

@niieani niieani commented Mar 27, 2026

Problem

On macOS, agent-browser get url (and other commands) could fail immediately after agent-browser install with Chrome exiting before it wrote DevToolsActivePort.

Observed error:

  • Auto-launch failed: Chrome exited early (exit code: unknown) without writing DevToolsActivePort
  • Chrome stderr showed dlopen failures for Google Chrome for Testing Framework.framework

Root Cause

The installer used a custom ZIP extraction loop for Chrome for Testing archives. On macOS, those app bundles contain framework symlinks. The custom extractor wrote every non-directory ZIP entry as a regular file, so symlink entries were materialized as plain files containing the symlink target text instead of real symlinks.

That corrupted the extracted Chrome bundle. When macOS tried to load the framework, required framework paths such as Resources, Versions/Current, and Google Chrome for Testing Framework no longer resolved correctly, so Chrome exited before startup completed.

Fix

  • replace the custom Chrome ZIP extraction loop with the zip crate extraction path, which preserves symlinks and applies safer path handling
  • use extract_unwrapped_root_dir(...) so the archive root still gets unwrapped without maintaining custom path-rewrite logic
  • add regression tests for both root-directory unwrapping and Unix symlink preservation

Verification

  • cargo test extract_zip_
  • cargo run -- get url

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 27, 2026

@niieani is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant