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.

UnhandledRejection: Cannot read property 'range' of undefined

See original GitHub issue

Karma version 5.2.3 Node version 14.15.2

After running the tests Chrome exits and I get the following error:

ERROR [karma-server]: UnhandledRejection: Cannot read property 'range' of undefined
ERROR [karma-server]: TypeError: Cannot read property 'range' of undefined

I suspect this to be related to #3571, node version 14.15.1 works correctly.

Please let me know if I need to provide more information.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
devoto13commented, Dec 16, 2020

I don’t think this issue is in Karma core. From #3571 it looks like the issue is in the @angular-devkit\build-angular plugin. I’ve tested with fresh @angular/cli@11 project and issue is not reproducible. Please consider below options:

  • stick with older Node version
  • upgrade to latest Angular
  • report bug to Angular CLI repository with minimal reproduction if you’re also using Angular 9 as in #3571. Angular 9 is an LTS release, so they may issue a fix.
  • debug this issue further and figure out if this is a Node regression, then it should be reported to Node itself (which is likely the case given that it broke in the patch release)

In any case, there is nothing we can do on the Karma core to fix issue in the third-party plugin as we don’t develop this plugin.

Happy to re-open if you provide a minimal reproduction showing that this issue is caused by the Karma core.

4reactions
mx2scommented, Mar 5, 2021

downgrading from node v15 to v14.16.0 helped, tests are working now

Read more comments on GitHub >

github_iconTop Results From Across the Web

[karma-server]: TypeError: Cannot read property 'range' of ...
Was able to figure it out. We were using node:latest in our .gitlab-ci.yml file and whatever that was pulling down was causing an...
Read more >
TypeError: Cannot read property 'range' of undefined
Try below script by entering a value in a cell that meets the conditions set in the script and see if it works?...
Read more >
Cannot read property 'range' of undefined - Angular Tests Fail ...
Shows Angular Unit Tests' scenario running locally and failing while in a docker container and possible solution addressing this issue.
Read more >
UnhandledRejection: Cannot read property 'range' of undefined
Karma version 5.2.3. Node version 14.15.2. After running the tests Chrome exits and I get the following error:
Read more >
ERROR TypeError: Cannot read property title of undefined
HEY, SET YOUR LIKE THERE ! ... Your browser can't play this video. ... Solved: ERROR TypeError: Cannot read property title of undefined....
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