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

Incorrect line numbers in stacktraces #119

Closed
SubJunk opened this issue Apr 22, 2020 · 1 comment
Closed

Incorrect line numbers in stacktraces #119

SubJunk opened this issue Apr 22, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SubJunk
Copy link
Member

SubJunk commented Apr 22, 2020

In our tests we are getting impossible line numbers, possibly due to ts-node (that's a guess).
e.g.

console.error
    Error: title is required
        at Object.exports.getBySanitizedTitle (/home/travis/build/UniversalMediaServer/api/src/controllers/media.ts:3018:11)
        at /home/travis/build/UniversalMediaServer/api/src/routes/media.ts:314:25
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:42:32)
        at /home/travis/build/UniversalMediaServer/api/node_modules/koa-router/lib/router.js:368:16
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:42:32)
        at /home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:34:12
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-router/lib/router.js:373:31)
        at dispatch (/home/travis/build/UniversalMediaServer/api/node_modules/koa-compose/index.js:42:32)
        at bodyParser (/home/travis/build/UniversalMediaServer/api/node_modules/koa-bodyparser/index.js:95:11)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at /home/travis/build/UniversalMediaServer/api/src/app.ts:624:3
        at /home/travis/build/UniversalMediaServer/api/src/app.ts:584:5
@SubJunk SubJunk added the bug Something isn't working label Apr 22, 2020
@js-kyle js-kyle self-assigned this Apr 24, 2020
@js-kyle
Copy link
Member

js-kyle commented Apr 24, 2020

After a veeeeeery long look into this, I tracked it down to a bug in Jest.

Jest issue: jestjs/jest#5739

As it happens, a fix for this has just been merged to Jest. It will be available in whatever version is published which is greater than this one https://github.com/facebook/jest/blob/master/CHANGELOG.md#2540

I confirmed it is the same issue, as I did a build without code coverage, and I got correct stack traces
Can prolly close this as dependabot will update up when a version is there

@SubJunk SubJunk closed this as completed Apr 24, 2020
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

No branches or pull requests

2 participants