question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read properties of undefined (reading 'currentlyAttachedTarget')

See original GitHub issue

Hi 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:open
  • Created a year ago
  • Reactions:8
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
emilyrohrboughcommented, Jun 22, 2022

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!

1reaction
anewlenscommented, Oct 25, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting an error 'TypeError: Cannot read properties of ...
Getting an error 'TypeError: Cannot read properties of undefined (reading 'setAttribute')' while setting an attribute for the input webelement.
Read more >
typeerror: cannot read properties of undefined (reading 'params')
Try to use render prop instead or with component={JournalPage} . Open side panel. Uncaught TypeError: Cannot read properties of undefined (readingΒ ...
Read more >
Why is the error "Cannot read properties of undefined (reading ...
The problem turned out to be with targeting this.template.host.style . I stopped doing this and instead used the querySelector() methodΒ ...
Read more >
Cannot read properties of undefined SessionInvalidated - Kofax
Cannot read properties of undefined (reading 'SessionInvalidated'). Another symptom is being stuck in a never-ending loop with this message:.
Read more >
Uncaught TypeError: Cannot read properties of undefined ...
Debugger code (debug.datatables.net): (can't get it to work with ... Uncaught TypeError: Cannot read properties of undefined (readingΒ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found