ArchiveBox icon indicating copy to clipboard operation
ArchiveBox copied to clipboard

Bug: Using wrong chrome binary for singlefile snapshot

Open LinusCDE opened this issue 3 years ago • 1 comments

Describe the bug

Creating a singlefile snapshot fails.

Steps to reproduce

  1. Created a snapshot that included "singlefile". Seems to work with any site.

Screenshots or log output

image

ArchiveBox version

ArchiveBox v0.6.2
Cpython Linux Linux-4.9.201-tegra-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           23 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                                                                              

[i] Data locations:
 √  OUTPUT_DIR            6 files         valid     /data                                                                       
 √  SOURCES_DIR           5 files         valid     ./sources                                                                   
 √  LOGS_DIR              1 files         valid     ./logs                                                                      
 √  ARCHIVE_DIR           8 files         valid     ./archive                                                                   
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf                                                           
 √  SQL_INDEX             268.0 KB        valid     ./index.sqlite3                                                             

Cause/Solution

I did the recommended commands from the error page. It told me that it failed with code 0. I ran the command for the full output and got a node error that the binary (/usr/bin/chromium-browser) didn't exist. Symlinking that path to ./chromium fixed it for the time being.

image

After that running the command again, actually did the singlefile job successfully.

So seems that there is some node stuff using the wrong chrome binary. Or the docker-compose.yml that hub.docker.com recommended me is missing some configuration. (this file was the latest version on the link to the master branch).

LinusCDE avatar Jun 05 '21 22:06 LinusCDE

This seems to be a know bug for ARM, see https://github.com/puppeteer/puppeteer/issues/6614

TrAnn3l avatar Sep 18 '21 10:09 TrAnn3l

Closing this as stale for now. I've tested it on x86, armv7, and armv8 (aka arm64 or aarch64) and singlefile w/ chrome seem to be working in Docker.

Please open a new issue if you're still encountering trouble on ArchiveBox version >= 0.7.2.

pirate avatar Jan 19 '24 10:01 pirate