Cannot read properties of undefined (reading 'currentlyAttachedTarget')
See original GitHub issueHi there,
Current behavior
Timed out waiting for the browser to connect. Retrying...
Cannot read properties of undefined (reading 'currentlyAttachedTarget')
TypeError: Cannot read properties of undefined (reading 'currentlyAttachedTarget')
at Object.connectToNewSpec (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/lib/browsers/chrome.js:431:48)
at Object.connectToNewSpec (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/lib/browsers/index.js:139:27)
at /path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/lib/open_project.js:148:47
at tryCatcher (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromiseCtx (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:641:10)
at _drainQueueStep (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues (/path/to/.cache/Cypress/10.2.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (node:internal/timers:464:21)
111
Desired behavior
no error
Test code to reproduce
I got this error many times with cypress run --browser chromium
. The test file includes 10~20 testcases.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cypress: 10.2.0 β
β Browser: Chromium 101 (headless) β
β Node Version: v16.12.0 (/usr/bin/node) β
β Params: Tag: false, Group: false, Parallel: false
Cypress Version
10.2.0
Other
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:14 (2 by maintainers)
Top GitHub Comments
Actually, I have reached out to someone who is familiar with this logic and it appears this is a mistake on how we are re-launching a browser after the first spec if the browser process is corrupt. This should be a relatively straightforward fix. Thank you for reporting!
Any update or workaround on this issue? running into this in version 10.0.0, 10.3.0 and 10.9.0. Need to stay 10.0 and above for NextJS compatibility.