简体   繁体   English

我尝试运行柏树,但总是返回错误“不支持 dri3 扩展”

[英]I try to run cypress, but always return me a error "dri3 extension not supported"

When I try to execute this command: "npx cypress open", the terminal return me a error: "ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported".当我尝试执行此命令时:“npx cypress open”,终端返回错误:“错误:gpu_memory_buffer_support_x11.cc(44)] 不支持 dri3 扩展”。 I can't resolve this.我无法解决这个问题。

Create a cypress structure创建柏树结构

this happens because where you want to test your cypress code, cypress cant use a GPU for whatever reason.发生这种情况是因为您想要测试 cypress 代码的地方,无论出于何种原因,cypress 都不能使用 GPU。 I had the same problem when running it in one of their docker files.在他们的 docker 文件之一中运行它时,我遇到了同样的问题。 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)在您的index.js文件中使用它,它会在您的测试开始之前检测您正在使用的浏览器并禁用 GPU 加速(据我所知,它仅适用于 chrome,因此您必须在需要时使用npx cypress run --browser chrome运行你的测试)

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 问题 5889
GitHub issue 564 GitHub 564期

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 每当我尝试运行 Cypress Suite 时都会出现以下错误 - Getting below error whenever I try to run Cypress Suite 每当我尝试在 VScode 终端中运行 cypress run --record --key xxxx 时,都会收到一条错误消息 - I get an error message whenever I try to run the cypress run --record --key xxxx in VScode terminal 我尝试使用 vercel 创建一个 next.js webapp,但是当我尝试在 cmd 上运行 vercel dev 时,它给了我这个错误 - I try to create a next.js webapp with vercel, but when i try to run vercel dev on cmd, it gave me this error 开玩笑时出现错误,我尝试运行测试 - Error on jest when I try to run the test Javascript并不总是在Chrome扩展程序中运行,我应该何时运行它? - Javascript not always working in Chrome Extension, when should I run it? 为什么我的 vscode 在我运行扩展时总是显示构建? - Why my vscode always show building when I run extension? 我用 create-react-app 创建了一个项目。 在我的 windows 电脑上,但当我尝试在命令行上运行 npm 时,它显示了这个错误。请帮助我 - I created a project with create-react-app. on my windows pc but when is try to run npm start on the command line it shows this error.please help me 为什么用cypress运行特定目录的测试对我来说是错误的? - Why is it wrong for me to run the tests of a specific directory with cypress? 赛普拉斯将文件内容与数组进行比较始终返回false - Cypress-compare file contents with an array always return false 自定义赛普拉斯 click() 命令始终返回 click({force: true}) - Custom Cypress click() command to always return click({force: true})
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM