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

Docker "Failed to launch chrome!" #20

Open
mlekorlz opened this issue Jul 26, 2024 · 2 comments
Open

Docker "Failed to launch chrome!" #20

mlekorlz opened this issue Jul 26, 2024 · 2 comments

Comments

@mlekorlz
Copy link

mlekorlz commented Jul 26, 2024

While running docker image, it's unable to get website screenshot.

changd-api  | https://google.com
changd-api  | Unable to get website screenshot: Error: Failed to launch chrome!
changd-api  | [57:57:0726/102936.931958:ERROR:browser_main_loop.cc(1485)] Unable to open X display.
changd-api  | TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
changd-api  | Unable to capture screenshot
changd-api  | Error: Image unable to be captured or differences detected.
changd-api  | Error: ENOENT: no such file or directory, unlink './screenshots/2/rmw9r_diff.png'
changd-api  |     at Object.unlinkSync (fs.js:1210:3)
changd-api  |     at Object.deleteFile (/app/db/file_handler.js:95:10)
changd-api  |     at executeVisualJob (/app/db/job_daemon.js:507:19)
changd-api  |     at processTicksAndRejections (internal/process/task_queues.js:93:5)
changd-api  |     at async /app/db/job_daemon.js:167:9 {
changd-api  |   errno: -2,
changd-api  |   syscall: 'unlink',
changd-api  |   code: 'ENOENT',
changd-api  |   path: './screenshots/2/rmw9r_diff.png'
changd-api  | }

@scubbx
Copy link

scubbx commented Aug 4, 2024

It seems to me that after this commit (51e386e#diff-0b013f15ba214974a2b092d590d3608e033cac4e865b68209ae3d984e727d7caL521) the Chrome-Browser now needs a X11 display address.

Maybe a virtual framebuffer with xvfb that is launched just before the chrom(ium) binary would work?

@mehmetkocali
Copy link

Same problem here, any ideas on how to solve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants