This article is about fixing Bug Docker Failed to launch the browser process! spawn usrbinchromium-browser ENOENT in ArchiveBox ArchiveBox
  • 12-Feb-2023
Lightrun Team
Author Lightrun Team
Share
This article is about fixing Bug Docker Failed to launch the browser process! spawn usrbinchromium-browser ENOENT in ArchiveBox ArchiveBox

Bug: Docker Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT in ArchiveBox ArchiveBox

Lightrun Team
Lightrun Team
12-Feb-2023

Explanation of the problem

Problem Description While trying to add a URL in singlefile mode using docker-compose, the process fails and the page suggests running the command “/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”. However, when this command is executed, the following error is produced:

"Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT"

The software used is ArchiveBox v0.6.2 and the current environment is running on a Cpython Linux with Linux-5.10.0-odroid-arm64-aarch64-with-glibc2.28 aarch64. The environment variables are set to IN_DOCKER=True, DEBUG=False, IS_TTY=True, TZ=UTC, and SEARCH_BACKEND_ENGINE=ripgrep.

Troubleshooting with the Lightrun Developer Observability Platform

Getting a sense of what’s actually happening inside a live application is a frustrating experience, one that relies mostly on querying and observing whatever logs were written during development.
Lightrun is a Developer Observability Platform, allowing developers to add telemetry to live applications in real-time, on-demand, and right from the IDE.

  • Instantly add logs to, set metrics in, and take snapshots of live applications
  • Insights delivered straight to your IDE or CLI
  • Works where you do: dev, QA, staging, CI/CD, and production

Start for free today

Problem solution for Bug: Docker Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT in ArchiveBox ArchiveBox

Upon inspection of the error message, it can be deduced that the system is trying to run /usr/bin/chromium-browser which does not exist. The correct executable file would be /usr/bin/chromium. To resolve the issue, there are two options:

  1. Create a symbolic link to /usr/bin/chromium using the following command:
ln -s /usr/bin/chromium /usr/bin/chromium-browser
  1. Modify the code to use /usr/bin/chromium instead of /usr/bin/chromium-browser. This can be done by making the following changes:
# Replace this line
--browser-executable-path=chromium

# With this line
--browser-executable-path=/usr/bin/chromium

In either case, this solution should resolve the “Failed to launch the browser process” error and allow the singlefile mode to be added successfully.

Other popular problems with ArchiveBox

Problem: Data import issue

One of the most common problems faced by ArchiveBox users is with data import. There are a number of issues that can arise when attempting to import data into ArchiveBox, including problems with file format, invalid URL, or missing dependencies.

Solution:

To address this problem, it is important to carefully review the documentation and troubleshooting guide provided by the ArchiveBox developers, as well as to seek assistance from the community if needed.

Here’s an example code block to demonstrate how to import data into ArchiveBox:

$ archivebox add https://example.com/page

Problem: Slow indexing performance

Another common problem faced by ArchiveBox users is slow indexing performance. This can occur when the system is processing a large number of records or when there are issues with the configuration of the system.

Solution:

To resolve this issue, it is important to ensure that the system is properly configured, that all necessary dependencies are installed, and that the system is running on adequate hardware.

Here’s an example code block to demonstrate how to optimize the indexing performance in ArchiveBox:

$ archivebox config set INDEXING_WORKERS=4

Problem: Incomplete archives

A third common problem faced by ArchiveBox users is incomplete archives. This can occur when there are issues with the scraping and archiving process, such as broken links, missing dependencies, or problems with the website structure.

Solution:

To resolve this issue, it is important to carefully review the log files provided by ArchiveBox, as well as to seek assistance from the community if needed.

Here’s an example code block to demonstrate how to re-run the archive process for an incomplete archive in ArchiveBox:

$ archivebox update --rerun <ARCHIVE_NAME>

A brief introduction to ArchiveBox

ArchiveBox is an open-source self-hosted web archive tool that allows users to store, index, and search the content of web pages. The tool is designed to be easy to use and configure, while also providing robust features and functionality to allow users to create and manage a comprehensive archive of the web. At its core, ArchiveBox uses a number of tools and technologies to capture, process, and store web content, including the Warc format for archiving, the Python programming language for scripting and automation, and the Elasticsearch search engine for indexing and searching the archive.

ArchiveBox provides a number of benefits to users, including the ability to store and preserve web content for future reference, the ability to search and retrieve content quickly and easily, and the ability to customize and extend the tool to meet specific needs and requirements. The tool also integrates with a variety of other technologies and platforms, such as the Wayback Machine, making it easy to publish and share archives with others. With its flexible architecture, easy-to-use interface, and powerful functionality, ArchiveBox is a valuable tool for anyone looking to archive and preserve the web.

Most popular use cases for ArchiveBox

  1. Web archiving and preservation

ArchiveBox can be used to create a comprehensive archive of web pages and content, allowing users to store and preserve web content for future reference and use. With its ability to capture, process, and store web content in the Warc format, ArchiveBox provides a powerful and flexible solution for web archiving and preservation.

Here’s an example code block to demonstrate how to archive a web page using ArchiveBox:

$ archivebox add https://example.com/page
  1. Search and retrieval of web content

ArchiveBox can be used to search and retrieve web content quickly and easily. With its integration of the Elasticsearch search engine, ArchiveBox provides a fast and efficient way to search and retrieve archived web pages and content, making it easy to find what you’re looking for.

  1. Customization and extension of functionality

ArchiveBox can be customized and extended to meet specific needs and requirements. With its flexible architecture, integration with other technologies and platforms, and support for scripting and automation, ArchiveBox provides a highly customizable and extensible tool for web archiving and preservation. Whether you need to automate the archiving process, integrate with other tools, or add custom functionality, ArchiveBox provides the flexibility and capabilities you need to get the job done.

Share

It’s Really not that Complicated.

You can actually understand what’s going on inside your live applications.

Try Lightrun’s Playground

Lets Talk!

Looking for more information about Lightrun and debugging?
We’d love to hear from you!
Drop us a line and we’ll get back to you shortly.

By submitting this form, I agree to Lightrun’s Privacy Policy and Terms of Use.