Error launching browser, Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds, The CDP port requested was 50877.
See original GitHub issueCurrent behavior
Title: Error launching browser
Message:
Downloading and starting the Electron Starting Guide example from the docs, build the binaries , for example /out/electron-quick-start-win32-x64/electron-quick-start.exe and link that Electron Browser to Cypress Browsers list to execute the tests ( https://docs.cypress.io/guides/guides/launching-browsers#Launching-by-a-path ) Currently this causes the following error:
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 <span class="ansi-yellow-fg">50877</span>.
Error details:
Error: connect ECONNREFUSED 127.0.0.1:50877 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
Stack trace:
Error: 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 [33m50877[39m.
Error details:
Error: connect ECONNREFUSED 127.0.0.1:50877
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
at get (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\lib\errors.js:988:15)
at Object.throwErr [as throw] (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\lib\errors.js:1006:9)
at C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\lib\browsers\protocol.js:106:21
at tryCatcher (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\promise.js:725:18)
at _drainQueueStep (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\perivolg\AppData\Local\Cypress\Cache\7.5.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:461:21)
Desired behavior
Downloading and starting the Electron Starting Guide example from the docs, build the binaries for example /out/electron-quick-start-win32-x64/electron-quick-start.exe and link that Electron Browser to Cypress Browsers list to execute the tests ( https://docs.cypress.io/guides/guides/launching-browsers#Launching-by-a-path )
Test code to reproduce
Test taken from Cypress.io
const execa = require('execa')
const findBrowser = () => {
const browserPath =
'{path_to}/electron-quick-start/out/electron-quick-start-win32-x64/electron-quick-start.exe'
return execa(browserPath, ['--version']).then((result) => {
return {
name: 'My.Electron.Browser',
channel: 'stable',
family: 'chromium',
displayName: 'My.Electron.Browser',
version: '1.0.0',
path: browserPath,
majorVersion: '1.0.0',
}
})
}
module.exports = (on, config) => {
return findBrowser().then((browser) => {
return {
browsers: config.browsers.concat(browser),
}
})
}
Versions
Cypress (latest) 7.5.0 Electron (latest) 13.1.2 (starting guide repo https://github.com/electron/electron-quick-start )
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
i have the same issue
macOS 10.15.5 , cypress 8.3.0![image](https://user-images.githubusercontent.com/22027570/130612279-eb6fc550-8a3f-4df2-ba9d-89e816ff39d9.png)