skip to Main Content

When I try to execute this command:

npx cypress open

then the terminal return me a error:

"ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported". I

Can’t resolve this.
Create a cypress structure.

2

Answers


  1. this happens because where you want to test your cypress code, cypress cant use a GPU for whatever reason. I had the same problem when running it in one of their docker files. Use this in your index.js file, it detects before your tests starts what browser you are using and disables GPU acceleration (as far as i know it only works for chrome so you have to use npx cypress run --browser chrome when you want to run your tests)

    module.exports = (on, config) => {
        on('before:browser:launch', (browser = {}, launchOptions) => {
          console.log(launchOptions.args)
      
          if (browser.name == 'chrome') {
            launchOptions.args.push('--disable-gpu')
          }
      
          return launchOptions
        }),
      }
    

    Maybe one of those could help:
    GitHub issue 5889
    GitHub issue 564

    Login or Signup to reply.
  2. If you run it on a virtual machine, try to look at this:
    https://shouv.medium.com/how-to-run-cypress-on-wsl2-989b83795fb6
    Otherwise, I suggest using docker images to run Cypress to get rid of all dependencies problems.
    https://hub.docker.com/u/cypress

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search