Skip to content

Setup challenges: Snap confinement and environment-specific blockers #191

@gavmor

Description

@gavmor

Environment-specific setup challenges (Lubuntu / Snap / Minimal Python)

Description:
Attempted to set up browser-harness on a Lubuntu environment and encountered several blockers related to Snap confinement, portable binary stability, and environment assumptions.

Key Issues Found:

  1. Snap Confinement: Default browsers (chromium, firefox) on Ubuntu/Lubuntu are Snaps. These run in a restricted mount namespace that prevents binding to the CDP port (9222) even with --no-sandbox. The harness's automatic discovery fails silently or with "Connection Refused."
  2. Portable Binary Instability: Attempted to bypass Snap using Playwright's Chromium binaries. Encountered fatal GPU and Zygote initialization errors (FATAL:gpu_data_manager_impl_private.cc:416). Even with --disable-gpu and --no-sandbox, the browser failed to maintain a stable connection in this restricted environment.
  3. Missing pip Dependency: The setup assumes python3 -m pip is available for uv or manual installs. On minimal Lubuntu installs, python3-pip is often missing, causing uv tool install or uv sync paths to fail if they need to fallback to system pip.
  4. Discovery Robustness: admin.py's _chrome_running() checks for specific process names but doesn't easily account for portable binaries with different command paths or names.

Suggestions for Improvement:

  • Add a check in --doctor or --setup to warn if the detected browser is a Snap.
  • Provide a dedicated "Headless Bootstrap" mode that doesn't rely on DevToolsActivePort discovery for systems without a persistent profile.
  • Document the requirement for python3-pip or provide a more robust uv bootstrap instruction for minimal environments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions