[GH-ISSUE #905] Bug: Docker Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT #2073

Closed
opened 2026-03-01 17:56:15 +03:00 by kerem · 10 comments
Owner

Originally created by @alpe12 on GitHub (Dec 17, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/905

Describe the bug

Singlefile output doesn't work.

Steps to reproduce

  1. Using docker-compose try to add a url with singlefile mode
  2. Fail. Try to run the command the page suggests running (/node/node_modules/single-file/cli/single-file --browser-executable-path=chromium "--browser-args=[\"--headless\", \"--no-sandbox\", \"--disable-gpu\", \"--disable-dev-shm-usage\", \"--disable-software-rasterizer\", \"--run-all-compositor-stages-before-draw\", \"--hide-scrollbars\", \"--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.61 Safari/537.36 ArchiveBox/{VERSION} (+https://github.com/ArchiveBox/ArchiveBox/)\", \"--window-size=1440,2000\"]" https://www.kabum.com.br/ singlefile.html)
  3. Error: "Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT"

ArchiveBox version

ArchiveBox v0.6.2
Cpython Linux Linux-5.10.0-odroid-arm64-aarch64-with-glibc2.28 aarch64
IN_DOCKER=True DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.6.2          valid     /usr/local/bin/archivebox
 √  PYTHON_BINARY         v3.9.5          valid     /usr/local/bin/python3.9
 √  DJANGO_BINARY         v3.1.10         valid     /usr/local/lib/python3.9/site-packages/django/bin/django-admin.py
 √  CURL_BINARY           v7.64.0         valid     /usr/bin/curl
 √  WGET_BINARY           v1.20.1         valid     /usr/bin/wget
 √  NODE_BINARY           v15.14.0        valid     /usr/bin/node
 √  SINGLEFILE_BINARY     v0.3.16         valid     /node/node_modules/single-file/cli/single-file
 √  READABILITY_BINARY    v0.0.2          valid     /node/node_modules/readability-extractor/readability-extractor
 √  MERCURY_BINARY        v1.0.0          valid     /node/node_modules/@postlight/mercury-parser/cli.js
 √  GIT_BINARY            v2.20.1         valid     /usr/bin/git
 √  YOUTUBEDL_BINARY      v2021.04.26     valid     /usr/local/bin/youtube-dl
 √  CHROME_BINARY         v89.0.4389.114  valid     /usr/bin/chromium
 √  RIPGREP_BINARY        v0.10.0         valid     /usr/bin/rg

[i] Source-code locations:
 √  PACKAGE_DIR           22 files        valid     /app/archivebox
 √  TEMPLATES_DIR         3 files         valid     /app/archivebox/templates
 -  CUSTOM_TEMPLATES_DIR  -               disabled

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

Apparently it tries to run /usr/bin/chromium-browser which doesn't exist. The correct would be /usr/bin/chromium.
Either symlink it, or change the code to use /usr/bin/chromium.
Thanks.

Originally created by @alpe12 on GitHub (Dec 17, 2021). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/905 #### Describe the bug Singlefile output doesn't work. #### Steps to reproduce 1. Using docker-compose try to add a url with singlefile mode 2. Fail. Try to run the command the page suggests running (`/node/node_modules/single-file/cli/single-file --browser-executable-path=chromium "--browser-args=[\"--headless\", \"--no-sandbox\", \"--disable-gpu\", \"--disable-dev-shm-usage\", \"--disable-software-rasterizer\", \"--run-all-compositor-stages-before-draw\", \"--hide-scrollbars\", \"--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.61 Safari/537.36 ArchiveBox/{VERSION} (+https://github.com/ArchiveBox/ArchiveBox/)\", \"--window-size=1440,2000\"]" https://www.kabum.com.br/ singlefile.html`) 3. Error: "Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT" #### ArchiveBox version ```logs ArchiveBox v0.6.2 Cpython Linux Linux-5.10.0-odroid-arm64-aarch64-with-glibc2.28 aarch64 IN_DOCKER=True DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep [i] Dependency versions: √ ARCHIVEBOX_BINARY v0.6.2 valid /usr/local/bin/archivebox √ PYTHON_BINARY v3.9.5 valid /usr/local/bin/python3.9 √ DJANGO_BINARY v3.1.10 valid /usr/local/lib/python3.9/site-packages/django/bin/django-admin.py √ CURL_BINARY v7.64.0 valid /usr/bin/curl √ WGET_BINARY v1.20.1 valid /usr/bin/wget √ NODE_BINARY v15.14.0 valid /usr/bin/node √ SINGLEFILE_BINARY v0.3.16 valid /node/node_modules/single-file/cli/single-file √ READABILITY_BINARY v0.0.2 valid /node/node_modules/readability-extractor/readability-extractor √ MERCURY_BINARY v1.0.0 valid /node/node_modules/@postlight/mercury-parser/cli.js √ GIT_BINARY v2.20.1 valid /usr/bin/git √ YOUTUBEDL_BINARY v2021.04.26 valid /usr/local/bin/youtube-dl √ CHROME_BINARY v89.0.4389.114 valid /usr/bin/chromium √ RIPGREP_BINARY v0.10.0 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 22 files valid /app/archivebox √ TEMPLATES_DIR 3 files valid /app/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled [i] Secrets locations: - CHROME_USER_DATA_DIR - disabled - COOKIES_FILE - disabled ``` Apparently it tries to run /usr/bin/chromium-browser which doesn't exist. The correct would be /usr/bin/chromium. Either symlink it, or change the code to use /usr/bin/chromium. Thanks.
Author
Owner

@darkstar commented on GitHub (Jan 28, 2022):

if you check the command line it tries to exceute, you see that it actually tries to override the chromium path via --browser-executable-path=chromium but that doesn't seem to work.

Official puppeteer docs seem to suggest that there is an environment variable, PUPPETEER_EXECUTABLE_PATH, that can be used as well, but that also doesn't work.

It seems the puppeteer they are shipping is broken and only checks the hardcoded path, and not the overrides.

<!-- gh-comment-id:1024725980 --> @darkstar commented on GitHub (Jan 28, 2022): if you check the command line it tries to exceute, you see that it actually tries to override the chromium path via `--browser-executable-path=chromium` but that doesn't seem to work. Official puppeteer docs seem to suggest that there is an environment variable, `PUPPETEER_EXECUTABLE_PATH`, that can be used as well, but that also doesn't work. It seems the puppeteer they are shipping is broken and only checks the hardcoded path, and not the overrides.
Author
Owner

@pirate commented on GitHub (Jan 30, 2022):

Maybe we can fix it with a symlink shim created in the Dockerfile that points /usr/bin/chromium-browser -> /usr/bin/chromium?

<!-- gh-comment-id:1025264736 --> @pirate commented on GitHub (Jan 30, 2022): Maybe we can fix it with a symlink shim created in the Dockerfile that points `/usr/bin/chromium-browser` -> `/usr/bin/chromium`?
Author
Owner

@darkstar commented on GitHub (Jan 31, 2022):

That would probably work, but the question is why does that (apparently) not pop up for the other architectures? And why is neither the commandline parameter nor the environment variable honored?

<!-- gh-comment-id:1025265301 --> @darkstar commented on GitHub (Jan 31, 2022): That would probably work, but the question is why does that (apparently) not pop up for the other architectures? And why is neither the commandline parameter nor the environment variable honored?
Author
Owner

@pirate commented on GitHub (Jan 31, 2022):

🤷 No idea, if you're able to reproduce the ignoring of the CLI arg with bare SingleFile, want to open an issue over on their repo https://github.com/gildas-lormeau/SingleFile/issues? I'm not too bothered by working around it without figuring out the root cause, since I'm going to be refactoring this stuff soon anyway.

<!-- gh-comment-id:1025266883 --> @pirate commented on GitHub (Jan 31, 2022): 🤷 No idea, if you're able to reproduce the ignoring of the CLI arg with bare SingleFile, want to open an issue over on their repo https://github.com/gildas-lormeau/SingleFile/issues? I'm not too bothered by working around it without figuring out the root cause, since I'm going to be refactoring this stuff soon anyway.
Author
Owner

@darkstar commented on GitHub (Jan 31, 2022):

nah, I'm fine with the symlink workaround (or any other), I'm not really too bothered about it too ;)

<!-- gh-comment-id:1026224006 --> @darkstar commented on GitHub (Jan 31, 2022): nah, I'm fine with the symlink workaround (or any other), I'm not really too bothered about it too ;)
Author
Owner

@tam481 commented on GitHub (Feb 18, 2022):

Is there a fix for this?

<!-- gh-comment-id:1045296291 --> @tam481 commented on GitHub (Feb 18, 2022): Is there a fix for this?
Author
Owner

@tam481 commented on GitHub (Feb 26, 2022):

hi all. Will the workaround be used as a fix and if yes, any chance this can be incorporated and released so that we can use it :-)

Thank you in advance

<!-- gh-comment-id:1052761729 --> @tam481 commented on GitHub (Feb 26, 2022): hi all. Will the workaround be used as a fix and if yes, any chance this can be incorporated and released so that we can use it :-) Thank you in advance
Author
Owner

@pirate commented on GitHub (Mar 13, 2022):

docker-compose exec archivebox ln -s /usr/bin/chromium /usr/bin/chromium-browser for now until I add a fix to the Dockerfile later.

<!-- gh-comment-id:1066029342 --> @pirate commented on GitHub (Mar 13, 2022): `docker-compose exec archivebox ln -s /usr/bin/chromium /usr/bin/chromium-browser` for now until I add a fix to the Dockerfile later.
Author
Owner

@albertoperezbautista commented on GitHub (Feb 9, 2023):

Lo resolví de la siguiente manera en el Dockerfile:

image
<!-- gh-comment-id:1424841541 --> @albertoperezbautista commented on GitHub (Feb 9, 2023): Lo resolví de la siguiente manera en el Dockerfile: <img width="774" alt="image" src="https://user-images.githubusercontent.com/58708535/217939058-6f4fd8a2-24f5-42ba-9949-5d1bc889549d.png">
Author
Owner

@pirate commented on GitHub (Jun 13, 2023):

is anyone still experiencing this issue on the latest archivebox/archivebox:dev image? I believe some of the recent fixes https://github.com/ArchiveBox/ArchiveBox/blob/dev/Dockerfile#L60 have addressed this, but if not comment back here and I'll re-open this issue.

<!-- gh-comment-id:1589037812 --> @pirate commented on GitHub (Jun 13, 2023): is anyone still experiencing this issue on the latest `archivebox/archivebox:dev` image? I believe some of the recent fixes https://github.com/ArchiveBox/ArchiveBox/blob/dev/Dockerfile#L60 have addressed this, but if not comment back here and I'll re-open this issue.
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#2073
No description provided.