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.

captureMessage on IE8 does not send message to Sentry

See original GitHub issue

Sentry version: 3.12.1 (self-hosted). OS & browser: Windows 7 & IE8 Performing Raven.captureMessage('Any string'); from within our window.onerror.

Managed to capture the exception message for this: Object doesn't support this property or method

Additionally, the events ravenSuccess and ravenError are not triggered, even with the workaround below.

Raven is configured and installed as per the docs, and works for the other browsers (barring IE7).

Since it’s a bit of a catch 22 trying to debug IE8, I used alerts to narrow down the line where it fails: - Line 1714

request.send(stringify(opts.data));

and more specifically, the stringify function is failing. Directly sending JSON.stringify(opts.data) works.

Apologies if this issue tone is a bit staccato, but any fix is appreciated!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
benvinegarcommented, Mar 9, 2017

On the contrary, removing our window.onerror (so it is just left with Raven) does not send anything to Sentry via its “regular” method (i.e. not calling captureException() manually ) on IE8.

Yeah, @LewisJEllis corrected me on this yesterday – our example test page “intentionally” has whitelistUrls set to reject the error. I did not see an exception thrown because it was suppressed.

1reaction
LewisJElliscommented, Mar 8, 2017

Core issue boils down to json-stringify-safe using Array.prototype.indexOf (see isaacs/json-stringify-safe/issues/6), while IE8 only has String.prototype.indexOf. We’re going to vendor in the json-stringify-safe dependency and modify it to avoid this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting for Next.js - Sentry Documentation
Capturing Resource 404s​​ By default, Sentry does not capture errors when a resource (like an image or a css file) fails to load....
Read more >
Troubleshooting for Cordova - Sentry Documentation
You can view the JSON payload of an event to see how Sentry stores additional data in the event. The shape of the...
Read more >
In using captureMessage in Sentry, how do I choose the type ...
I have been going through the doc here, but it seems like I can't make the message type to be of non error....
Read more >
How to use the @sentry/node.captureMessage function ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. ... no-console console.error(message); } if...
Read more >
raven-js Documentation
being sent to Sentry as either regular expressions or strings. Does not affect captureMessage or when non-error object is passed in as ...
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