Skip to content

Give the runtime user a writable HOME so the browser helper's Chromium can start - #43

Closed
AerStorme wants to merge 1 commit into
raccommode:mainfrom
AerStorme:fix/chromium-home
Closed

AerStorme wants to merge 1 commit into
raccommode:mainfrom
AerStorme:fix/chromium-home

Conversation

@AerStorme

Copy link
Copy Markdown

Thanks for this project! I've started changing a few things with the help of Claude Code. Here is a fix for the project's built-in browser (the Chromium used by the browser helper).

Problem

docker-entrypoint.sh drops privileges with setpriv but keeps HOME=/root, which the runtime user (PUID) cannot write.
Chromium's crash reporter then aborts at startup:

chrome_crashpad_handler: --database is required

so every browser-based capture done by easyx-browser-fetch fails with Chromium debugging page did not start.
This is visible, for example, when a live stream falls back to the browser capture after yt-dlp could not resolve it.

Reproduce inside the running container:

docker exec -u node -e HOME=/root open-easyx easyx-browser-fetch --capture-media https://stripchat.com/
# -> Chromium debugging page did not start

Fix

  • docker-entrypoint.sh: create /tmp/easyx-home owned by the runtime user and export it as HOME before dropping privileges. yt-dlp and other tools also get a writable cache directory.
  • scripts/easyx-browser-fetch.py: when HOME is not writable, fall back to a per-user temporary home, so the helper also works with other launchers.

Testing

  • With the patched entrypoint, the application processes run with HOME=/tmp/easyx-home and easyx-browser-fetch --capture-media starts Chromium again (the capture reaches the page instead of failing at startup).
  • With HOME=/root forced, the helper's fallback alone also lets Chromium start.

…m can start

The entrypoint drops privileges with setpriv but keeps HOME=/root, which the
runtime user (PUID) cannot write. Chromium's crash reporter then aborts at
startup with "chrome_crashpad_handler: --database is required", so every
browser-based capture (easyx-browser-fetch) fails with "Chromium debugging
page did not start".

- docker-entrypoint.sh: create /tmp/easyx-home for the runtime user and export
  it as HOME before dropping privileges (yt-dlp and other tools also get a
  writable cache directory).
- easyx-browser-fetch: fall back to a per-user temporary home when HOME is not
  writable, so the helper also works with other launchers.
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