Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to Launch Browser apify/actor-node-puppeteer-chrome #103

Open
PeterPilley opened this issue May 22, 2023 · 4 comments
Open

Failed to Launch Browser apify/actor-node-puppeteer-chrome #103

PeterPilley opened this issue May 22, 2023 · 4 comments
Assignees
Labels
t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@PeterPilley
Copy link

Using actor-node-puppeteer-chrome in Docker on a remote server.

When attempting to use await page.screenshot I get failed to launch browser process.

Googling around I can see it could be due to missing dependencies with the docker image.

I have tried changing versions of the docker image from 16 to 18 with no change

@PeterPilley
Copy link
Author

Discovered this error in the process
ERROR PuppeteerCrawler: Request failed and reached maximum retries. Error: Failed to launch the browser process!
ap-auditor-workers | 2023-05-22T02:49:11.818867697Z [0522/024911.526188:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

it is trying to setup an instance Starting X virtual framebuffer using: Xvfb :99 -ac -screen 0 1920x1080x24+32 -nolisten tcp

@PeterPilley
Copy link
Author

Ok resolved this by following the instructions here puppeteer/puppeteer#3451

The fix was to take the apify docker file add this
USER root
RUN echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf
USER myuser # to return to the original user

then add in docker-compose.yml

cap:
- SYS_ADMIN

@B4nan
Copy link
Member

B4nan commented May 22, 2023

@vladfrangu please take a look at this

@gippy gippy added the t-tooling Issues with this label are in the ownership of the tooling team. label May 22, 2023
@fcpauldiaz
Copy link

this issue still happens today with docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

5 participants