错误:读取 ECONNRESET在 TCP.onStreamRead (internal/stream_base_commons.js:201:27) { errno: 'ECONNRESET',代码:'ECONNRESET',系统调用:'read'} 错误:阅读 ECONNRESET在 TCP.onStreamRead (internal/stream_base_commons.js:201:27)
无法连接到 Chrome,1 秒后重试(尝试 61/62)
<块引用>
无法连接到 Chrome,1 秒后重试(尝试 62/62)
赛普拉斯未能连接到 Chrome DevTools 协议重试 50 秒后.
这通常表示打开 Chrome 浏览器时出现问题.请求的 CDP 端口是 62236.错误详情:错误:找不到 CRI 目标在lazyAssLogic (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
esourcesapppackagesserver
ode_moduleslazy-assindex.js:110:14)在 Object.lazyAss (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
esourcesapppackagesserver
ode_moduleslazy-assindex.js:115:28)在 findStartPage (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
esourcesapppackagesserverlibrowsersprotocol.js:56:23)
使用的配置:
柏树:^4.9.0(最新)
操作系统:windows7
内存:16gb
我找到了以下解决方案
解决 Chrome/Edge 问题:禁用 GPU(图形处理单元)
在 plugins/index.js 中添加这段代码
on('before:browser:launch', (browser, launchOptions) => {if ((browser.name === 'chrome' || browser.name === 'edge') && browser.isHeadless) {launchOptions.args.push('--disable-gpu');返回启动选项}});
在 cypress 4.11.0 firefox 问题也解决了
Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:201:27) { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:201:27)
Failed to connect to Chrome, retrying in 1 second (attempt 61/62)
Failed to connect to Chrome, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.
This usually indicates there was a problem opening the Chrome browser.
The CDP port requested was 62236.
Error details:
Error: could not find CRI target
at lazyAssLogic (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
esourcesapppackagesserver
ode_moduleslazy
-assindex.js:110:14)
at Object.lazyAss (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
esourcesapppackagesserver
ode_modulesla
zy-assindex.js:115:28)
at findStartPage (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
esourcesapppackagesserverlibrowserspro
tocol.js:56:23)
Configurations used:
cypress: ^4.9.0 (latest)
OS: windows7
ram: 16gb
I've found following solutions
To Solve Chrome/Edge issue: disable GPU (Graphics processing Unit)
add this code in plugins/index.js
on('before:browser:launch', (browser, launchOptions) => {
if ((browser.name === 'chrome' || browser.name === 'edge') && browser.isHeadless) {
launchOptions.args.push('--disable-gpu');
return launchOptions
}
});
In cypress 4.11.0 firefox issue is also resolved
这篇关于在 cypress 中的 firefox 或 edge 或 chrome 中执行多个规范时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!