[英]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.