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!
I've confirmed this on my end. AFAIK, "regular" exception (e.g. captureException
, onerror
) handling seems fine.
Will look into a fix asap.
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.
Thanks for looking into this!
@benvinegar
I've confirmed this on my end. AFAIK, "regular" exception (e.g. captureException, onerror) handling seems fine.
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.
Debug time:
wrapped
on IE8 (or it's not called at any point) like it does on ffx and Chrome & IE9+, so I believe Raven falls back to its global onerror handler, which is traceKitWindowOnError
?_handleOnErrorStackInfo
_handleStackInfo
_processException
_send
_sendProcessedPayload
_makeRequest
stringify
serializer()
seems to be fineJSON.stringify
seems to failtry-catch
around it and received the same error message: Object doesn't support this property or method
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 鈥撀爋ur example test page "intentionally" has whitelistUrls
set to reject the error. I did not see an exception thrown because it was suppressed.
Fantastic work gents, will get this into production.