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.

TypeError: Cannot read properties of undefined (reading 'split') cypress_runner.js 198481

See original GitHub issue

Current behavior

I have a test failing in CI that I want to run locally to debug.

I cannot get cypress to run locally—which I’ve always been able to do until recently.

I’ve deleted caches at /user/Library/Caches/Cypress/*, reinstalled countless times, tried on two different machines. I’ve also gotten my coworkers to run locally and they don’t have issues.

Whenever a test is run I get this error. It occurs regardless of the test. I verified this using the getting started test from the docs:

describe('My First Test', () => {
  it('Does not do much!', () => {
    expect(true).to.equal(true)
  })
})

image

The top of the stack trace leads to this from cypress_runner

var splitStack = function splitStack(stack) {
  var lines = stack.split('\n');
  return _.reduce(lines, function (memo, line) {
    if (memo.messageEnded || stackLineRegex.test(line)) {
      memo.messageEnded = true;
      memo[1].push(line);
    } else {
      memo[0].push(line);
    }

    return memo;
  }, [[], []]);
};

It seems like others have had similar issues. I noticed that popper.js.map is 404ing in the terminal.

image

Desired behavior

Trying to get any test to run. It’s failing before I can.

Test code to reproduce

Using this test as a sanity check from the docs:

describe('My First Test', () => {
  it('Does not do much!', () => {
    expect(true).to.equal(true)
  })
})

Use cypress open and click it!

Cypress Version

4.7.0

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Jul 6, 2022

@saylestyler - did your issue got resolved? If so, how? I am facing same issue

0reactions
NataMTcommented, Dec 20, 2022

+1 Having the same issue, has anyone found the fix? thx

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'split' of undefined · Issue #8062 - GitHub
Current behavior: Sometimes this happen and I don't know how to simulate: the logs are these: cypress_runner.js:198105 TypeError: Cannot ...
Read more >
Cypress TypeError: Cannot read properties of undefined ...
We invoked the function exported by `C:\Jenkins\workspace\ABC\cypress\plugins\index.js`, but it threw an error. TypeError: Cannot read ...
Read more >
cypress-io/cypress - Gitter
hello. reading through the release notes for 4.6.0, i don't see anything about changing ... The error was: Cannot read property 'split' of...
Read more >
Changelog - Cypress Documentation
Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.
Read more >
Cannot read properties of undefined' - JavaScript Debugging
JavaScript Tutorial. How To Fix 'Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging. 26K views 6 months ago.
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