GoogleChromeLabs / GoogleChromeLabs/chrome-for-testing

@puppeteer/browsers package doesn't install dependencies

Open
#121 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
159
Avg merge
18h 37m
Merged PRs (30d)
3

Description

The [README.md](https://github.com/GoogleChromeLabs/chrome-for-testing/blob/main/README.md) and [official blog post](https://developer.chrome.com/blog/chrome-for-testing/) both make it look as though installing via `@puppeteer/browsers` will give you working Chrome browsers.

However, installing this way does not provide all the required dependencies. If I run my reproduction Dockerfile

```
FROM python:3.11-bookworm # Based on Debian Bookwork

RUN apt-get update --fix-missing && apt-get upgrade -y && apt-get dist-upgrade -y

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs

RUN npx @puppeteer/browsers install chrome@123.0.6312.58 | \
awk '{print $2}' | \
xargs -I {} ln --symbolic {} /usr/local/bin/chrome
RUN npx @puppeteer/browsers install chromedriver@123.0.6312.58 | \
awk '{print $2}' | \
xargs -I {} ln --symbolic {} /usr/local/bin/chromedriver

ENTRYPOINT /usr/local/bin/chromedriver
```

I get the error

```
/usr/local/bin/chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
```

This is talked about somewhat in https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55, where people detail their various workarounds for installing the dependencies. I've raised this issue separately, because https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55 is talking about instructions being missing entirely for installation from the ZIP files, whereas my concern is that the provided instructions for using `@puppeteer/browsers` are incomplete and misleading.

There should be an officially blessed way to install the dependencies; it's unfortunate that the consumers of chrome-for-testing are guessing how to best install the dependencies.

Contributor guide

Open the contributing guide

Research direction

Start with README.md, the @puppeteer/browsers installation commands, and the reproduction Dockerfile. Compare the documented install path with issue 55 and verify the missing libnss3.so dependency in the provided environment. Done means the project documents an officially supported way to install all required dependencies when using @puppeteer/browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
dockerfile, javascript, nodejs
Domain
cli, devops, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.