Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property ... of undefined #226

Closed
CSchulz opened this issue Sep 10, 2020 · 5 comments · Fixed by #247
Closed

TypeError: Cannot read property ... of undefined #226

CSchulz opened this issue Sep 10, 2020 · 5 comments · Fixed by #247
Labels
bug Something isn't working

Comments

@CSchulz
Copy link

CSchulz commented Sep 10, 2020

If there is an error during the test execution the reporter fails:

HeadlessChrome 83.0.4103 (Linux 0.0.0) ERROR
  An error was thrown in afterAll
  Uncaught [object Object] thrown
HeadlessChrome 83.0.4103 (Linux 0.0.0): Executed 212 of 672 ERROR (2.777 secs / 2.406 secs)
10 09 2020 07:25:37.681:ERROR [karma-server]: TypeError: Cannot read property 'projects/commons/src/public_api-dev.ts' of undefined
    at node_modules/karma-sabarivka-reporter/src/instrumenter.ts:35:18
    at Array.forEach (<anonymous>)
    at addFileListToCoverageData (node_modules/karma-sabarivka-reporter/src/instrumenter.ts:32:16)
    at exports.sabarivkaReporter.Object.defineProperty.value.onBrowserComplete (node_modules/karma-sabarivka-reporter/src/instrumenter.ts:16:5)
    at Server.<anonymous> (node_modules/karma/lib/events.js:40:26)
    at Server.emit (events.js:208:15)
    at Browser.onComplete (node_modules/karma/lib/browser.js:95:20)
    at Socket.<anonymous> (node_modules/karma/lib/browser.js:212:44)
    at Socket.emit (events.js:208:15)
    at node_modules/socket.io/lib/socket.js:528:12
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
@kopach
Copy link
Owner

kopach commented Sep 11, 2020

Hi @CSchulz. What version of karma/TypeScript you use? Could you, please, also double check if you get any similar error from any other karma plugin if this one is disabled?

@CSchulz
Copy link
Author

CSchulz commented Sep 21, 2020

Typescript 3.5.3
Karma 4.1.0

Yes it also occurs if I disable all other stuff.

@kopach kopach mentioned this issue Sep 21, 2020
kopach added a commit that referenced this issue Sep 22, 2020
@kopach kopach reopened this Sep 22, 2020
@kopach kopach added the bug Something isn't working label Sep 22, 2020
@kopach
Copy link
Owner

kopach commented Sep 22, 2020

hi @CSchulz. I've just released fix for this in version 3.2.4. Please, check it out if it works for you now.

@kopach
Copy link
Owner

kopach commented Sep 22, 2020

@CSchulz, closing this ticket as of now. Please, reopen it if issue is still reproducible for you. Also consider starring this project if you like it. Thanks

@kopach kopach closed this as completed Sep 22, 2020
@CSchulz
Copy link
Author

CSchulz commented Sep 24, 2020

No further crashes for the moment. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants