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.

Sentry fails when processing errors without a stacktrace

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

I have full sourcemaps and releases are automatically uploaded to Sentry. For Sentry error reports I’m getting:

There was 1 error encountered while processing this event
Invalid location in sourcemap: (None, None)

{
  "column": null,
  "source": "https://ismaywolff.nl/work",
  "row": null
}

In Chrome my sourcemaps resolve without problems. Also on sourcemaps.io my sourcemaps validate without errors as well. I’m building full sourcemaps with columns and lines in webpack with source-map (see here), and outputting them through uglify with sourceMap: true as well.

So everything should be fine, but instead I’m getting the error above.

What is the expected behavior?

For raven-js to report the error without warnings.

  • Chrome 57
  • Raven-js 3.14.2
  • OSX 10.12.4
  • Did this work in previous versions of Raven.js: haven’t tried
  • Are you using the CDN (http://ravenjs.com): yes
  • Are you using hosted Sentry: hosted

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ismaycommented, May 5, 2017

Ok, so the problem was that the Error I was triggering to test Sentry was a fetch error. Which didn’t have a stacktrace with line numbers (as the error is created asynchronously, see here). Which meant that Sentry couldn’t refer to a particular line.

I’d say in this case Sentry or Raven are not to blame technically. But:

  • A clear error message (i.e. something like: no line/column numbers found in stacktrace, or invalid stacktrace) would have saved me a lot of work. The current error is quite non-descript.
  • You could just fail gracefully and state that a stacktrace couldn’t be found, so the error can’t be mapped to a specific line. And don’t display this state as being in error, as everything that happened here is still according to the js spec (i.e. errors don’t have to have a stack property).

Also, it seems weird that the error reporting is so reliant on a non-standard feature, see MDN. Maybe it would be good to warn users of this as well, as non-supporting browsers would send errors that Sentry apparently can’t process.

0reactions
kamilogorekcommented, Sep 28, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I get the stack trace without an exception/error in Sentry?
Trying to see if I can get the stack trace (for both backend and frontend) on Sentry, without actually creating an error.
Read more >
Enable Readable Stack Traces in Your Errors
Sentry will use the release's uploaded source maps to unminify the error's stack trace. As part of the CI/CD workflow for this app...
Read more >
Stack Trace Interface - Sentry Developer Documentation
When adding a stack trace to an event, follow this rule of thumb: If the stack trace is part of an error, exception...
Read more >
How we made Sentry work to swiftly identify production issues
By default, Sentry uses stack trace to group events together. For our setup, when a certain exception was raised from two different locations...
Read more >
Making Go errors play nice with Sentry - Incident.io
Open the error in Sentry; Use the stacktrace to find the code that went wrong; Go into the code to apply a fix....
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