Skip to content

[Bug]: Installer hangs on sudo password prompt during Playwright step for non-sudo user #25816

Description

@sam55silver

Bug Description

Summary

When installing Hermes as a dedicated, non-sudo system service user, the installer hangs indefinitely on a sudo password prompt during the Playwright browser step. Because this optional, browser-only step runs before setup_path(), aborting it leaves the install half-finished.

Environment

  • OS: Debian
  • Hermes installed under a dedicated, non-sudo system service user (hermes)

What happens

The installer stops dead here:

✓ Node.js dependencies installed
→ Installing browser engine (Playwright Chromium)...
→ Playwright may request sudo to install browser system dependencies (shared libraries).
→ This is standard Playwright setup — Hermes itself does not require root access.
Installing dependencies...
Switching to root user to install dependencies...
[sudo] password for hermes:

This is install_node_deps() running npx playwright install --with-deps chromium (the ubuntu|debian|... branch of the case statement). The --with-deps flag shells out to apt and requires root. A non-sudo service user can't satisfy this prompt, so the installer blocks indefinitely (or must be aborted).

Why it's worse than a failed browser step

In main(), the call order is:

install_deps
install_node_deps      # <-- hangs here on the sudo prompt
setup_path             # <-- never runs
...

Because the Playwright step blocks/aborts the installer before setup_path runs, the hermes launcher shim is never created. The user is left with:

  1. No hermes command on PATH → hermes doctor doesn't exist.
  2. Running the raw entry point directly (~/.hermes/hermes-agent/hermes) fails, because that bypasses the venv launcher shim and uses system Python:
ModuleNotFoundError: No module named 'dotenv'
  File ".../hermes_cli/env_loader.py", line 9, in <module>
    from dotenv import load_dotenv

A single optional, browser-only step ends up blocking the entire install and leaving a half-installed, unusable setup.

References

Originating Discord discussion: https://discord.com/channels/1053877538025386074/1504192942372290760

Steps to Reproduce

  1. On a Debian host, create a dedicated, non-sudo system service user (e.g. hermes).
  2. Switch to that user and run the Hermes installer.
  3. Let the installer proceed through clone_reposetup_venvinstall_depsinstall_node_deps.
  4. Observe the installer reach the "Installing browser engine (Playwright Chromium)" step and run npx playwright install --with-deps chromium.

Result: the installer prints [sudo] password for hermes: and hangs. The non-sudo user cannot satisfy the prompt, so the install never reaches setup_path().

Expected Behavior

  • The installer detects that passwordless sudo is unavailable and degrade gracefully instead of blocking on a password prompt — the same way install_system_packages() already does with its sudo -n true check.
  • The Playwright/browser step is optional and should be non-fatal: if it can't complete, the installer should warn, print manual instructions, and continue.
  • A non-sudo install should still finish with a working hermes command on PATH and a usable hermes doctor (browser tools simply disabled until a browser is installed manually).

Actual Behavior

The installer hangs indefinitely at:

→ Installing browser engine (Playwright Chromium)...
→ Playwright may request sudo to install browser system dependencies (shared libraries).
→ This is standard Playwright setup — Hermes itself does not require root access.
Installing dependencies...
Switching to root user to install dependencies...
[sudo] password for hermes:

After aborting, setup_path() has not run, so there is no hermes command.

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

No response

Debug Report

Not available: `hermes debug share` cannot be run because the install never completed — `setup_path()` never ran, so there is no `hermes` command on PATH.

System details are provided in the sections below instead.

Operating System

Debian 12 (bookworm)

Python Version

3.11.15

Hermes Version

v0.13.0 (2026.5.7)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Add an interactive (Y/n) prompt before installing the browser engine

When a terminal is attached, ask whether to install Playwright/Chromium at all. In non-interactive contexts (curl | bash, no TTY), default to skipping with a clear "browser tools disabled, run X later" message, the same way the setup wizard already self-skips without a TTY.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions