stack twitter rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    How to use Chrome in Cypress on WSL

    Problem 1

    Can't run because you've entered an invalid browser name.
    
    Browser: 'chrome' was not found on your system or is not supported by Cypress.
    

    Solution 1

    I always like to have a command I can run before and after a change to verify a change had the desired effect:

    google-chrome --version

    This should fail. Now install the latest version of Chrome in WSL:

    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

    Followed by:

    sudo apt -y install ./google-chrome-stable_current_amd64.deb

    You can delete the .deb archive afterwards.

    Now again try:

    google-chrome --version

    Problem 2

    Could not start Cypress headlessly. Your CI provider must support XVFB.

    Solution 2

    Ensure you've enabled running the Cypress GUI in WSL