[GH-ISSUE #1263] Playwright install may hangs at installing chromium if manually setting PID and GID in docker #777

Closed
opened 2026-03-01 14:46:13 +03:00 by kerem · 2 comments
Owner

Originally created by @gnattu on GitHub (Nov 4, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1263

Describe the bug

When using docker-compose to deploy the latest 7.0 ArchiveBox, docker compose run archivebox init --setup will hang at installing chromium if PGID and PUID is specified with env variables.

By doing something like docker compose run --entrypoint /bin/bash -it archivebox to run the playwright install command manually (as root in this case) and the python -m playwright install chromium will returns normally, the chromium is located in /browsers/chromium-1084/chrome-linux/chrome. But if I set PGID and PUID, python -m playwright install chromium also hangs and never returns.

I currently workarounds this by manually config --set CHROME_BINARY=/browsers/chromium-1084/chrome-linux/chrome and archivebox seems to be working normally.

Steps to reproduce

Modify the docker-compose.yml:

- PUID=1000                       # set to your host user's UID & GID if you encounter permissions issues
- PGID=1000

Run docker compose run archivebox init --setup

It hangs at installing Chromium.

Screenshots or log output

[+] Installing enabled ArchiveBox dependencies automatically...

    Installing YOUTUBEDL_BINARY automatically using pip...
2023.10.13 is already installed yt-dlp

    Installing CHROME_BINARY automatically using playwright...
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: playwright in /usr/local/lib/python3.11/site-packages (1.39.0)
Requirement already satisfied: greenlet==3.0.0 in /usr/local/lib/python3.11/site-packages (from playwright) (3.0.0)
Requirement already satisfied: pyee==11.0.1 in /usr/local/lib/python3.11/site-packages (from playwright) (11.0.1)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.11/site-packages (from pyee==11.0.1->playwright) (4.8.0)


Hangs here

^C[X] Failed to install chromium using playwright: KeyboardInterrupt

ArchiveBox version

0.7.0
ArchiveBox v0.7.0 Cpython Linux Linux-6.5.7-orbstack-00109-gd8500ae6683d-aarch64-with-glibc2.36 aarch64
DEBUG=False IN_DOCKER=True IN_QEMU=False IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=True FS_USER=1000:1000 FS_PERMS=644 SEARCH_BACKEND=sonic

[i] Dependency versions:
 √  PYTHON_BINARY         v3.11.6         valid     /usr/local/bin/python3.11
 √  SQLITE_BINARY         v2.6.0          valid     /usr/local/lib/python3.11/sqlite3/dbapi2.py
 √  DJANGO_BINARY         v3.1.14         valid     /usr/local/lib/python3.11/site-packages/django/__init__.py
 √  ARCHIVEBOX_BINARY     v0.7.0          valid     /usr/local/bin/archivebox

 √  CURL_BINARY           v8.4.0          valid     /usr/bin/curl
 √  WGET_BINARY           v1.21.3         valid     /usr/bin/wget
 √  NODE_BINARY           v21.1.0         valid     /usr/bin/node
 √  SINGLEFILE_BINARY     v1.1.18         valid     /app/node_modules/single-file-cli/single-file
 √  READABILITY_BINARY    v0.0.9          valid     /app/node_modules/readability-extractor/readability-extractor
 √  MERCURY_BINARY        v1.0.0          valid     /app/node_modules/@postlight/parser/cli.js
 √  GIT_BINARY            v2.39.2         valid     /usr/bin/git
 √  YOUTUBEDL_BINARY      v2023.10.13     valid     /usr/local/bin/yt-dlp
 √  CHROME_BINARY         v119.0.6045.9   valid     /browsers/chromium-1084/chrome-linux/chrome
 √  RIPGREP_BINARY        v13.0.0         valid     /usr/bin/rg

[i] Source-code locations:
 √  PACKAGE_DIR           24 files        valid     /app/archivebox
 √  TEMPLATES_DIR         4 files         valid     /app/archivebox/templates
 -  CUSTOM_TEMPLATES_DIR  -               disabled  None

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled  None
 -  COOKIES_FILE          -               disabled  None

[i] Data locations:
 √  OUTPUT_DIR            9 files @       valid     /data
 √  SOURCES_DIR           51 files        valid     ./sources
 √  LOGS_DIR              1 files         valid     ./logs
 √  ARCHIVE_DIR           337 files @     valid     ./archive
 √  CONFIG_FILE           162.0 Bytes     valid     ./ArchiveBox.conf
 √  SQL_INDEX             2.4 MB          valid     ./index.sqlite3
Originally created by @gnattu on GitHub (Nov 4, 2023). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1263 <!-- Please fill out the following information, feel free to delete sections if they're not applicable or if long issue templates annoy you. (the only required section is the version information) --> #### Describe the bug <!-- A description of what the bug is, what you expected to happen, and any relevant context about issue. --> When using docker-compose to deploy the latest 7.0 [ArchiveBox](https://github.com/ArchiveBox/ArchiveBox), `docker compose run archivebox init --setup` will hang at installing chromium if PGID and PUID is specified with env variables. By doing something like `docker compose run --entrypoint /bin/bash -it archivebox` to run the playwright install command manually (as root in this case) and the `python -m playwright install chromium` will returns normally, the chromium is located in `/browsers/chromium-1084/chrome-linux/chrome`. But if I set PGID and PUID, `python -m playwright install chromium` also hangs and never returns. I currently workarounds this by manually `config --set CHROME_BINARY=/browsers/chromium-1084/chrome-linux/chrome` and archivebox seems to be working normally. #### Steps to reproduce <!-- For example: 1. Ran ArchiveBox with the following config '...' 2. Saw this output during archiving '....' 3. UI didn't show the thing I was expecting '....' --> Modify the `docker-compose.yml`: ``` - PUID=1000 # set to your host user's UID & GID if you encounter permissions issues - PGID=1000 ``` Run `docker compose run archivebox init --setup` It hangs at installing Chromium. #### Screenshots or log output <!-- If applicable, post any relevant screenshots or copy/pasted terminal output from ArchiveBox. If you're reporting a parsing / importing error, **you must paste a copy of your redacted import file here**. --> ``` [+] Installing enabled ArchiveBox dependencies automatically... Installing YOUTUBEDL_BINARY automatically using pip... 2023.10.13 is already installed yt-dlp Installing CHROME_BINARY automatically using playwright... Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: playwright in /usr/local/lib/python3.11/site-packages (1.39.0) Requirement already satisfied: greenlet==3.0.0 in /usr/local/lib/python3.11/site-packages (from playwright) (3.0.0) Requirement already satisfied: pyee==11.0.1 in /usr/local/lib/python3.11/site-packages (from playwright) (11.0.1) Requirement already satisfied: typing-extensions in /usr/local/lib/python3.11/site-packages (from pyee==11.0.1->playwright) (4.8.0) Hangs here ^C[X] Failed to install chromium using playwright: KeyboardInterrupt ``` #### ArchiveBox version <!-- Run the `archivebox version` command locally then copy paste the result here: --> ```logs 0.7.0 ArchiveBox v0.7.0 Cpython Linux Linux-6.5.7-orbstack-00109-gd8500ae6683d-aarch64-with-glibc2.36 aarch64 DEBUG=False IN_DOCKER=True IN_QEMU=False IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=True FS_USER=1000:1000 FS_PERMS=644 SEARCH_BACKEND=sonic [i] Dependency versions: √ PYTHON_BINARY v3.11.6 valid /usr/local/bin/python3.11 √ SQLITE_BINARY v2.6.0 valid /usr/local/lib/python3.11/sqlite3/dbapi2.py √ DJANGO_BINARY v3.1.14 valid /usr/local/lib/python3.11/site-packages/django/__init__.py √ ARCHIVEBOX_BINARY v0.7.0 valid /usr/local/bin/archivebox √ CURL_BINARY v8.4.0 valid /usr/bin/curl √ WGET_BINARY v1.21.3 valid /usr/bin/wget √ NODE_BINARY v21.1.0 valid /usr/bin/node √ SINGLEFILE_BINARY v1.1.18 valid /app/node_modules/single-file-cli/single-file √ READABILITY_BINARY v0.0.9 valid /app/node_modules/readability-extractor/readability-extractor √ MERCURY_BINARY v1.0.0 valid /app/node_modules/@postlight/parser/cli.js √ GIT_BINARY v2.39.2 valid /usr/bin/git √ YOUTUBEDL_BINARY v2023.10.13 valid /usr/local/bin/yt-dlp √ CHROME_BINARY v119.0.6045.9 valid /browsers/chromium-1084/chrome-linux/chrome √ RIPGREP_BINARY v13.0.0 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 24 files valid /app/archivebox √ TEMPLATES_DIR 4 files valid /app/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled None [i] Secrets locations: - CHROME_USER_DATA_DIR - disabled None - COOKIES_FILE - disabled None [i] Data locations: √ OUTPUT_DIR 9 files @ valid /data √ SOURCES_DIR 51 files valid ./sources √ LOGS_DIR 1 files valid ./logs √ ARCHIVE_DIR 337 files @ valid ./archive √ CONFIG_FILE 162.0 Bytes valid ./ArchiveBox.conf √ SQL_INDEX 2.4 MB valid ./index.sqlite3 ``` <!-- Tickets without full version info will closed until it is provided, we need the full output here to help you solve your issue -->
kerem closed this issue 2026-03-01 14:46:14 +03:00
Author
Owner

@pirate commented on GitHub (Nov 4, 2023):

Ah that makes sense the browsers dir is owned by root, I can fix it by chowning it to UID and GID in the entry point.

<!-- gh-comment-id:1793507025 --> @pirate commented on GitHub (Nov 4, 2023): Ah that makes sense the browsers dir is owned by root, I can fix it by chowning it to UID and GID in the entry point.
Author
Owner

@pirate commented on GitHub (Nov 7, 2023):

Done github.com/ArchiveBox/ArchiveBox@fd9803f3b7 (diff-254aea5175), pull and give it a try once a new build pushes or git clone ...; docker build . -t archivebox:dev

<!-- gh-comment-id:1798158765 --> @pirate commented on GitHub (Nov 7, 2023): Done https://github.com/ArchiveBox/ArchiveBox/commit/fd9803f3b7df412735dbadc61c941c463d404a76#diff-254aea51756d9b799a5f11b27665e521174adee9bff6100afd0d2e53a4dc1643R49, pull and give it a try once a new build pushes or `git clone ...; docker build . -t archivebox:dev`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#777
No description provided.