[GH-ISSUE #155] Double-download of Chromium binary and broken symlinks in Dockerfile #107

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

Originally created by @raman325 on GitHub (Mar 2, 2019).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/155

Describe the bug
When I attempt to run docker-compose as recommended, the puppeteer installation step fails. From https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker I see a section that says:

# Uncomment to skip the chromium download when installing puppeteer. If you do,
# you'll need to launch puppeteer with:
#     browser.launch({executablePath: 'google-chrome-unstable'})
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

Is it possible that should be included in the Dockerfile run (including using the new launch command) since we are downloading google-chrome-unstable anyway?

Steps to reproduce
Steps to reproduce the behavior:

  1. Clone repo
  2. Run docker-compose up -d

Screenshots or log output

> puppeteer@1.12.2 install /node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r624492! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/node_modules/puppeteer/lib/helper.js:108:27)
    at Object.<anonymous> (/node_modules/puppeteer/install.js:64:16)
    at Module._compile (internal/modules/cjs/loader.js:738:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
    at Module.load (internal/modules/cjs/loader.js:630:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
    at Function.Module._load (internal/modules/cjs/loader.js:562:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
    at internal/main/run_main_module.js:21:11
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '0.0.0.0',
  port: 443 }
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.12.2 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.12.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-02T16_43_12_505Z-debug.log
ERROR: Service 'archivebox' failed to build: The command '/bin/sh -c npm i puppeteer' returned a non-zero code: 1

Software versions (please complete the following information):

  • ArchiveBox version: master (63e6ed8)
  • Python version: Latest version on Debian Stretch (node:11-slim)
  • OS: Synology DSM 6.2.1-23824 Update 6
  • Chrome version: Latest google-chrome-unstable version on Debian Stretch (node:11-slim)
Originally created by @raman325 on GitHub (Mar 2, 2019). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/155 **Describe the bug** When I attempt to run docker-compose as recommended, the puppeteer installation step fails. From https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker I see a section that says: ``` # Uncomment to skip the chromium download when installing puppeteer. If you do, # you'll need to launch puppeteer with: # browser.launch({executablePath: 'google-chrome-unstable'}) # ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true ``` Is it possible that should be included in the Dockerfile run (including using the new launch command) since we are downloading google-chrome-unstable anyway? **Steps to reproduce** Steps to reproduce the behavior: 1. Clone repo 2. Run `docker-compose up -d` **Screenshots or log output** ``` > puppeteer@1.12.2 install /node_modules/puppeteer > node install.js ERROR: Failed to download Chromium r624492! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download. { Error: connect ECONNREFUSED 0.0.0.0:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14) -- ASYNC -- at BrowserFetcher.<anonymous> (/node_modules/puppeteer/lib/helper.js:108:27) at Object.<anonymous> (/node_modules/puppeteer/install.js:64:16) at Module._compile (internal/modules/cjs/loader.js:738:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10) at Module.load (internal/modules/cjs/loader.js:630:32) at tryModuleLoad (internal/modules/cjs/loader.js:570:12) at Function.Module._load (internal/modules/cjs/loader.js:562:3) at Function.Module.runMain (internal/modules/cjs/loader.js:801:12) at internal/main/run_main_module.js:21:11 errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '0.0.0.0', port: 443 } npm WARN enoent ENOENT: no such file or directory, open '/package.json' npm WARN !invalid#1 No description npm WARN !invalid#1 No repository field. npm WARN !invalid#1 No README data npm WARN !invalid#1 No license field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! puppeteer@1.12.2 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer@1.12.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-03-02T16_43_12_505Z-debug.log ERROR: Service 'archivebox' failed to build: The command '/bin/sh -c npm i puppeteer' returned a non-zero code: 1 ``` **Software versions (please complete the following information):** - ArchiveBox version: master (63e6ed8) - Python version: Latest version on Debian Stretch (node:11-slim) - OS: Synology DSM 6.2.1-23824 Update 6 - Chrome version: Latest google-chrome-unstable version on Debian Stretch (node:11-slim)
kerem 2026-03-01 14:40:41 +03:00
Author
Owner

@raman325 commented on GitHub (Mar 2, 2019):

Created PR #156 with this change and another one which got my container up and running.

Also, just a suggestion, you should consider adding --remove-orphans as an argument to your docker-compose command on your Docker page. An extra container ends up getting created as part of the process that is orphaned and is stopped - just uses up extra space. Final command under https://github.com/pirate/ArchiveBox/wiki/Docker#setup would be docker-compose up -d --remove-orphans if you agree. I tested it and it appears to be safe.

<!-- gh-comment-id:468943221 --> @raman325 commented on GitHub (Mar 2, 2019): Created PR #156 with this change and another one which got my container up and running. Also, just a suggestion, you should consider adding `--remove-orphans` as an argument to your docker-compose command on your Docker page. An extra container ends up getting created as part of the process that is orphaned and is stopped - just uses up extra space. Final command under https://github.com/pirate/ArchiveBox/wiki/Docker#setup would be `docker-compose up -d --remove-orphans` if you agree. I tested it and it appears to be safe.
Author
Owner

@raman325 commented on GitHub (Mar 2, 2019):

Also noticed on your Wiki page for Docker, you reference /bin/archive in multiple places which doesn't exist. Should that be /bin/archivebox instead?

EDIT: this comment is irrelevant given @pirate's comments on my PR

<!-- gh-comment-id:468947129 --> @raman325 commented on GitHub (Mar 2, 2019): ~~Also noticed on your Wiki page for Docker, you reference `/bin/archive` in multiple places which doesn't exist. Should that be `/bin/archivebox` instead?~~ EDIT: this comment is irrelevant given @pirate's comments on my PR
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#107
No description provided.