JavaScript source map processing produces "-1" for all line and column numbers

david_alexander

Posted on
Jan 13 2016

We've come across an issue with the processing of certain JavaScript stack traces. The unprocessed stack trace looks like this:

 at BLModeSelectionScreen.DisplaySlots line 69626, column 19 (http://URL-REDACTED/latest/dist/bundle.js:69626)
 at UIEventHandler.handler line 69735, column 35 (http://URL-REDACTED/latest/dist/bundle.js:69735)
 at UIEventHandler.callee$3$0$ line 67903, column 47 (http://URL-REDACTED/latest/dist/bundle.js:67903)
 at tryCatch line 19336, column 40 (http://URL-REDACTED/latest/dist/bundle.js:19336)
 at GeneratorFunctionPrototype.invoke [as _invoke] line 19598, column 22 (http://URL-REDACTED/latest/dist/bundle.js:19598)
 at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] line 19369, column 21 (http://URL-REDACTED/latest/dist/bundle.js:19369)
 at step line 72244, column 41 (http://URL-REDACTED/latest/dist/bundle.js:72244)
 at at line 72247, column 9 (http://URL-REDACTED/latest/dist/bundle.js:72247)
 at new Promise line 18173, column 7 (http://URL-REDACTED/latest/dist/bundle.js:18173)
 at __awaiter line 72222, column 12 (http://URL-REDACTED/latest/dist/bundle.js:72222)

We've verified that this stack trace is correct by processing it through other tools. The processed stack trace should look like this:

 at BLModeSelectionScreen.DisplaySlots line 49, column 8 (BingoLounge/BingoLounge/scripts/BLModeSelectionScreen.tsx:49:8)
 at UIEventHandler.handler line 69720, column 34 (http://URL-REDACTED/latest/dist/bundle.js:69720:34)
 at UIEventHandler.callee$3$0$ line 617, column 16 (LootWinner2.0/LootWinnerEngine/LootWinnerEngine/scripts/UI/UIComponent.ts:617:16)
 at tryCatch line 3675, column 0 (../../../LootWinner2.0/LootWinnerEngine/LootWinnerEngine/libs/browser-polyfill.js:3675:0)
 at GeneratorFunctionPrototype.invoke [as _invoke] line 3937, column 0 (../../../LootWinner2.0/LootWinnerEngine/LootWinnerEngine/libs/browser-polyfill.js:3937:0)
 at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] line 3708, column 0 (../../../LootWinner2.0/LootWinnerEngine/LootWinnerEngine/libs/browser-polyfill.js:3708:0)
 at step line 12, column 8 (LootWinner2.0/LootWinnerEngine/LootWinnerEngine/BuildConfig/release.js:12:8)
 at at line 72247, column 9 (http://URL-REDACTED/latest/dist/bundle.js:72247:9)
 at new Promise line 2512, column 0 (../../../LootWinner2.0/LootWinnerEngine/LootWinnerEngine/libs/browser-polyfill.js:2512:0)
 at __awaiter line 5, column 31 (LootWinner2.0/LootWinnerEngine/LootWinnerEngine/BuildConfig/release.js:5:31)

However, instead it looks like this:

 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)
 at line -1, column -1 (null:-1)

This would seem to suggest an error processing the stack trace, but I can't find any information on what could be going wrong.

This was all working correctly before, but for unrelated reasons we had to disable minification temporarily (though we still have a number of other build steps that require source-mapping, such as TypeScript compilation), and this seems to have caused the problem.

If you need to look up these errors, our Raygun App ID is gi4ll6, and our account is services@lootwinner.com. I can provide additional information privately if needed, including the source map that we're using.


Alex

Posted on
Jan 13 2016

Hi David,

We've resolved the issue which caused the "-1" entries into the stacktrace.

This was caused because the JavaScript file and map file didn't correlate with each other and the invalid mapping was mistakenly included in the remapped stacktrace. This was probably triggered when you swapped between minified and unminifed files.

Unmappable stacklines should now just report the location in the minified code like they used to.

I've sent you an email regarding some account specific details to your email.

Best regards,
Alex


david_alexander

Posted on
Jan 13 2016

Thanks - this is now working for me.


Reply