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:
- 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."
- 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.
- 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.
- 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.
Environment-specific setup challenges (Lubuntu / Snap / Minimal Python)
Description:
Attempted to set up
browser-harnesson a Lubuntu environment and encountered several blockers related to Snap confinement, portable binary stability, and environment assumptions.Key Issues Found:
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."FATAL:gpu_data_manager_impl_private.cc:416). Even with--disable-gpuand--no-sandbox, the browser failed to maintain a stable connection in this restricted environment.pipDependency: The setup assumespython3 -m pipis available foruvor manual installs. On minimal Lubuntu installs,python3-pipis often missing, causinguv tool installoruv syncpaths to fail if they need to fallback to system pip.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:
--doctoror--setupto warn if the detected browser is a Snap.DevToolsActivePortdiscovery for systems without a persistent profile.python3-pipor provide a more robustuvbootstrap instruction for minimal environments.