BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

Playwright docker failing to find chromium

Open DEfusion opened this issue 2 years ago • 1 comments

This started happening on our CI yesterday:

browserType.launch: Executable doesn't exist at /opt/pw-browsers/chromium-1080/chrome-linux/chrome
                ╔═════════════════════════════════════════════════════════════════════════╗
                ║ Looks like Playwright Test or Playwright was just installed or updated. ║
                ║ Please run the following command to download new browsers:              ║
                ║                                                                         ║
                ║     yarn playwright install                                             ║
                ║                                                                         ║
                ║ <3 Playwright Team                                                      ║
                ╚═════════════════════════════════════════════════════════════════════════╝
                    at module.exports.createPlaywrightBrowser (/usr/lib/node_modules/backstopjs/core/util/runPlaywright.js:43:42)

I ended up adding this to our Dockerfile to make it work temporarily:

RUN mkdir -p /opt/pw-browsers/chromium-1080/chrome-linux \
    && ln -s /usr/bin/chromium /opt/pw-browsers/chromium-1080/chrome-linux/chrome

I found this related https://github.com/garris/BackstopJS/issues/1468 but we're already on 6.2.2

DEfusion avatar Sep 20 '23 10:09 DEfusion

Perhaps a silly suggestion - but did you try logging out and logging back in and trying again? Saying because I noticed there're some issues when you have just installed playwright and next trying to download browsers. Perhaps the state clash with the usual chrome browser in the machine?

Reference: https://playwright.dev/docs/browsers

madukan avatar Sep 07 '24 05:09 madukan