Skip to content

fix: companion launches your real Chrome like a normal browser#48

Merged
Anton-Horn merged 1 commit into
mainfrom
fix/companion-real-chrome-flags
Jun 4, 2026
Merged

fix: companion launches your real Chrome like a normal browser#48
Anton-Horn merged 1 commit into
mainfrom
fix/companion-real-chrome-flags

Conversation

@Anton-Horn
Copy link
Copy Markdown
Contributor

Problem

zero browser connect drives the user's real Chrome via Playwright, but Playwright's launch defaults are tuned for throwaway CI Chromium and degrade a real browser. Captured from chrome://version on an actual launch:

… --disable-extensions --disable-component-update --disable-sync
  --enable-unsafe-swiftshader --no-sandbox --profile-directory=Default …

This is the reproduced cause of the "browser is unstable / uses flags that don't exist (no sandbox)" report:

  • --no-sandbox — Playwright's chromiumSandbox defaults to false, so it strips the OS sandbox on the user's live browsing and trips Chrome's yellow "You are using an unsupported command-line flag: --no-sandbox. Stability and security will suffer." warning.
  • --disable-extensions — kills the user's extensions (password managers / 1Password vanish, logins break).
  • --enable-unsafe-swiftshader — forces software WebGL (janky rendering).
  • --disable-sync — turns off their sync.

Fix

Set chromiumSandbox: true and strip the disruptive default args via ignoreDefaultArgs, so the window the agent drives behaves like the user's actual Chrome. Verified the launch still connects and is controllable, with --no-sandbox and --disable-extensions gone.

Shipping note

The laptop CLI bundle is served from the server (/zero-cli.jszero/dist/cli.js). Redeploy the server with the rebuilt bundle, then re-run curl …/install.sh | sh to pick it up.

Playwright's launch defaults are tuned for throwaway CI Chromium and
degrade the user's real Chrome: chromiumSandbox defaults to false (adds
--no-sandbox, which strips the OS sandbox on live browsing and trips
Chrome's "unsupported command-line flag … stability and security will
suffer" warning), and the default args disable the user's extensions
(password managers break), force software WebGL, and turn off sync.

Set chromiumSandbox:true and strip the disruptive default args so the
window the agent drives is the user's actual Chrome.
@Anton-Horn Anton-Horn merged commit 20b5f35 into main Jun 4, 2026
1 check passed
@Anton-Horn Anton-Horn deleted the fix/companion-real-chrome-flags branch June 4, 2026 15:43
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