Sentry-javascript: Unhandled Promise rejection: toISOString is not a function ; Zone: <root>

Created on 13 Dec 2018  Â·  20Comments  Â·  Source: getsentry/sentry-javascript

Package + Version

  • [x] @sentry/browser
  • [ ] @sentry/node
  • [ ] raven-js
  • [ ] raven-node _(raven for node)_
  • [ ] other:

Version:

4.4.1

Description

An API endpoint threw this

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Request Error</title>
    <style>BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}</style>
  </head>
  <body>
    <div id="content">
      <p class="heading1">Request Error</p>
      <p>The server encountered an error processing the request. See server logs for more details.</p>
    </div>
  </body>
</html>

Inside the Error handler as per your docs, the following error message blow up my change detection

Unhandled Promise rejection: toISOString is not a function ; Zone: <root> ; Task: Promise.then ; Value: TypeError: toISOString is not a function
    at String.toJSON (<anonymous>)
    at Object.eval (_ctx.js:18)
    at JSON.stringify (<anonymous>)
    at serialize (index.js:831)
    at BeaconTransport.eval (index.js:2804)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BeaconTransport.captureEvent (index.js:2801)
    at BrowserBackend.eval (index.js:2946)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BrowserBackend.sendEvent (index.js:2921)
    at BrowserClient.eval (baseclient.js:157)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at eval (baseclient.js:156)
    at BrowserClient.eval (baseclient.js:334)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at fulfilled (tslib.es6.js:68)
    at ZoneDelegate.invoke (zone.js:388)
    at Zone.run (zone.js:138)
    at eval (zone.js:872)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1566) TypeError: toISOString is not a function
    at String.toJSON (<anonymous>)
    at Object.eval (webpack-internal:///./node_modules/core-js/modules/_ctx.js:18:15)
    at JSON.stringify (<anonymous>)
    at serialize (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:831:17)
    at BeaconTransport.eval (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2804:24)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at BeaconTransport.captureEvent (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2801:24)
    at BrowserBackend.eval (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2946:54)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at BrowserBackend.sendEvent (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2921:24)
    at BrowserClient.eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:157:77)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:156:115)
    at BrowserClient.eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:334:46)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at fulfilled (webpack-internal:///./node_modules/tslib/tslib.es6.js:88:58)
    at ZoneDelegate.invoke (webpack-internal:///./node_modules/zone.js/dist/zone.js:388:26)
    at Zone.run (webpack-internal:///./node_modules/zone.js/dist/zone.js:138:43)
    at eval (webpack-internal:///./node_modules/zone.js/dist/zone.js:872:34)
    at ZoneDelegate.invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:421:31)
    at Zone.runTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:188:47)
    at drainMicroTaskQueue (webpack-internal:///./node_modules/zone.js/dist/zone.js:595:35)
    at ZoneTask.invokeTask [as invoke] (webpack-internal:///./node_modules/zone.js/dist/zone.js:500:21)
    at invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:1540:14)
    at XMLHttpRequest.globalZoneAwareCallback (webpack-internal:///./node_modules/zone.js/dist/zone.js:1566:17)

This prevented my modal for sign in from rendering to the screen.

I have found a work around where i simply don't give you this error message and handle the error locally, however i'd like some insights if you have any as to why the serializer inside @Sentry has trouble parsing some XML?

some extra info

Browser witnessed in Chrome 70

Angular CLI: 1.7.3
Node: 9.6.1
OS: linux x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack-bundle-analyzer: 2.13.1
webpack: 3.11.0

Cheers

Confirmed Needs Reproduction Bug

Most helpful comment

I gave that a try and the Date specific error is gone but now is replaced with

Unhandled Promise rejection: Converting circular structure to JSON ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at serialize (index.js:752)
    at BeaconTransport.eval (index.js:2842)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BeaconTransport.captureEvent (index.js:2839)
    at BrowserBackend.eval (index.js:2984)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BrowserBackend.sendEvent (index.js:2959)
    at BrowserClient.eval (baseclient.js:157)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at eval (baseclient.js:156)
    at BrowserClient.eval (baseclient.js:334)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at fulfilled (tslib.es6.js:68)
    at ZoneDelegate.invoke (zone.js:388)
    at Zone.run (zone.js:138)
    at eval (zone.js:872)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1566) TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at serialize (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:752:17)
    at BeaconTransport.eval (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2842:24)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at BeaconTransport.captureEvent (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2839:24)
    at BrowserBackend.eval (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2984:54)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at BrowserBackend.sendEvent (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2959:24)
    at BrowserClient.eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:157:77)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:156:115)
    at BrowserClient.eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:334:46)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at fulfilled (webpack-internal:///./node_modules/tslib/tslib.es6.js:88:58)
    at ZoneDelegate.invoke (webpack-internal:///./node_modules/zone.js/dist/zone.js:388:26)
    at Zone.run (webpack-internal:///./node_modules/zone.js/dist/zone.js:138:43)
    at eval (webpack-internal:///./node_modules/zone.js/dist/zone.js:872:34)
    at ZoneDelegate.invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:421:31)
    at Zone.runTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:188:47)
    at drainMicroTaskQueue (webpack-internal:///./node_modules/zone.js/dist/zone.js:595:35)
    at ZoneTask.invokeTask [as invoke] (webpack-internal:///./node_modules/zone.js/dist/zone.js:500:21)
    at invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:1540:14)
    at XMLHttpRequest.globalZoneAwareCallback (webpack-internal:///./node_modules/zone.js/dist/zone.js:1566:17)
(anonymous) @ index.js:3573
api.onUnhandledError @ zone.js:665
handleUnhandledRejection @ zone.js:692
_loop_1 @ zone.js:682
api.microtaskDrainDone @ zone.js:686
drainMicroTaskQueue @ zone.js:602
ZoneTask.invokeTask @ zone.js:500
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566
error (async)
customScheduleGlobal @ zone.js:1666
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleEventTask @ zone.js:258
(anonymous) @ zone.js:1831
(anonymous) @ index.js:3400
desc.set @ zone.js:1244
WebSocketTransport @ sockjs.js:2978
SockJS._connect @ sockjs.js:828
SockJS._receiveInfo @ sockjs.js:802
g @ sockjs.js:66
EventEmitter.emit @ sockjs.js:86
(anonymous) @ sockjs.js:567
g @ sockjs.js:66
EventEmitter.emit @ sockjs.js:86
(anonymous) @ sockjs.js:374
g @ sockjs.js:66
EventEmitter.emit @ sockjs.js:86
xhr.onreadystatechange @ sockjs.js:1597
sentryWrapped @ index.js:3114
wrapFn @ zone.js:1188
sentryWrapped @ index.js:3114
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:496
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566
XMLHttpRequest.send (async)
(anonymous) @ VM6639:1
scheduleTask @ zone.js:2969
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:3001
proto.(anonymous function) @ zone.js:1394
(anonymous) @ index.js:3839
AbstractXHRObject._start @ sockjs.js:1605
(anonymous) @ sockjs.js:1494
sentryWrapped @ index.js:3114
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:496
ZoneTask.invoke @ zone.js:485
timer @ zone.js:2054
setTimeout (async)
scheduleTask @ zone.js:2075
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:2090
proto.(anonymous function) @ zone.js:1394
(anonymous) @ index.js:3323
AbstractXHRObject @ sockjs.js:1493
XHRLocalObject @ sockjs.js:2914
InfoAjax @ sockjs.js:356
InfoReceiver._getReceiver @ sockjs.js:536
InfoReceiver.doXhr @ sockjs.js:556
(anonymous) @ sockjs.js:525
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:496
ZoneTask.invoke @ zone.js:485
timer @ zone.js:2054
setTimeout (async)
scheduleTask @ zone.js:2075
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:2090
proto.(anonymous function) @ zone.js:1394
InfoReceiver @ sockjs.js:524
SockJS @ sockjs.js:730
initSocket @ socket.js:9
(anonymous) @ client:211
(anonymous) @ index.js?http://0.0.0.0:0:254
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:0 @ vendor.bundle.js:6905
__webpack_require__ @ inline.bundle.js:55
0 @ main.bundle.js:1882
__webpack_require__ @ inline.bundle.js:55
webpackJsonpCallback @ inline.bundle.js:26
(anonymous) @ main.bundle.js:1
4zone.js:388 Uncaught (in promise) TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at serialize (index.js:752)
    at BeaconTransport.eval (index.js:2842)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BeaconTransport.captureEvent (index.js:2839)
    at BrowserBackend.eval (index.js:2984)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BrowserBackend.sendEvent (index.js:2959)
    at BrowserClient.eval (baseclient.js:157)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at eval (baseclient.js:156)
    at BrowserClient.eval (baseclient.js:334)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at fulfilled (tslib.es6.js:68)
    at ZoneDelegate.invoke (zone.js:388)
    at Zone.run (zone.js:138)
    at eval (zone.js:872)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1566)

All 20 comments

I did come across https://github.com/angular/angular/issues/17772 which highlights why the change detection might not of triggered... but not why that error blew up int he first place

@KevCJones can you give it a try with 4.4.2? We released a patch to serializer which takes Date objects into account – https://github.com/getsentry/sentry-javascript/commit/dece6ee52fc854e15a6908bbe83cf6c56bb905e6#diff-a88b07b3d334ad11919cdcaf8b58d2b1R291

I gave that a try and the Date specific error is gone but now is replaced with

Unhandled Promise rejection: Converting circular structure to JSON ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at serialize (index.js:752)
    at BeaconTransport.eval (index.js:2842)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BeaconTransport.captureEvent (index.js:2839)
    at BrowserBackend.eval (index.js:2984)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BrowserBackend.sendEvent (index.js:2959)
    at BrowserClient.eval (baseclient.js:157)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at eval (baseclient.js:156)
    at BrowserClient.eval (baseclient.js:334)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at fulfilled (tslib.es6.js:68)
    at ZoneDelegate.invoke (zone.js:388)
    at Zone.run (zone.js:138)
    at eval (zone.js:872)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1566) TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at serialize (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:752:17)
    at BeaconTransport.eval (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2842:24)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at BeaconTransport.captureEvent (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2839:24)
    at BrowserBackend.eval (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2984:54)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at BrowserBackend.sendEvent (webpack-internal:///./node_modules/@sentry/browser/dist/index.js:2959:24)
    at BrowserClient.eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:157:77)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:91:71)
    at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891:29)
    at Object.__awaiter (webpack-internal:///./node_modules/tslib/tslib.es6.js:87:12)
    at eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:156:115)
    at BrowserClient.eval (webpack-internal:///./node_modules/@sentry/core/dist/baseclient.js:334:46)
    at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:117:23)
    at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:98:53)
    at fulfilled (webpack-internal:///./node_modules/tslib/tslib.es6.js:88:58)
    at ZoneDelegate.invoke (webpack-internal:///./node_modules/zone.js/dist/zone.js:388:26)
    at Zone.run (webpack-internal:///./node_modules/zone.js/dist/zone.js:138:43)
    at eval (webpack-internal:///./node_modules/zone.js/dist/zone.js:872:34)
    at ZoneDelegate.invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:421:31)
    at Zone.runTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:188:47)
    at drainMicroTaskQueue (webpack-internal:///./node_modules/zone.js/dist/zone.js:595:35)
    at ZoneTask.invokeTask [as invoke] (webpack-internal:///./node_modules/zone.js/dist/zone.js:500:21)
    at invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:1540:14)
    at XMLHttpRequest.globalZoneAwareCallback (webpack-internal:///./node_modules/zone.js/dist/zone.js:1566:17)
(anonymous) @ index.js:3573
api.onUnhandledError @ zone.js:665
handleUnhandledRejection @ zone.js:692
_loop_1 @ zone.js:682
api.microtaskDrainDone @ zone.js:686
drainMicroTaskQueue @ zone.js:602
ZoneTask.invokeTask @ zone.js:500
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566
error (async)
customScheduleGlobal @ zone.js:1666
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleEventTask @ zone.js:258
(anonymous) @ zone.js:1831
(anonymous) @ index.js:3400
desc.set @ zone.js:1244
WebSocketTransport @ sockjs.js:2978
SockJS._connect @ sockjs.js:828
SockJS._receiveInfo @ sockjs.js:802
g @ sockjs.js:66
EventEmitter.emit @ sockjs.js:86
(anonymous) @ sockjs.js:567
g @ sockjs.js:66
EventEmitter.emit @ sockjs.js:86
(anonymous) @ sockjs.js:374
g @ sockjs.js:66
EventEmitter.emit @ sockjs.js:86
xhr.onreadystatechange @ sockjs.js:1597
sentryWrapped @ index.js:3114
wrapFn @ zone.js:1188
sentryWrapped @ index.js:3114
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:496
invokeTask @ zone.js:1540
globalZoneAwareCallback @ zone.js:1566
XMLHttpRequest.send (async)
(anonymous) @ VM6639:1
scheduleTask @ zone.js:2969
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:3001
proto.(anonymous function) @ zone.js:1394
(anonymous) @ index.js:3839
AbstractXHRObject._start @ sockjs.js:1605
(anonymous) @ sockjs.js:1494
sentryWrapped @ index.js:3114
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:496
ZoneTask.invoke @ zone.js:485
timer @ zone.js:2054
setTimeout (async)
scheduleTask @ zone.js:2075
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:2090
proto.(anonymous function) @ zone.js:1394
(anonymous) @ index.js:3323
AbstractXHRObject @ sockjs.js:1493
XHRLocalObject @ sockjs.js:2914
InfoAjax @ sockjs.js:356
InfoReceiver._getReceiver @ sockjs.js:536
InfoReceiver.doXhr @ sockjs.js:556
(anonymous) @ sockjs.js:525
ZoneDelegate.invokeTask @ zone.js:421
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:496
ZoneTask.invoke @ zone.js:485
timer @ zone.js:2054
setTimeout (async)
scheduleTask @ zone.js:2075
ZoneDelegate.scheduleTask @ zone.js:407
Zone.scheduleTask @ zone.js:232
Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:2090
proto.(anonymous function) @ zone.js:1394
InfoReceiver @ sockjs.js:524
SockJS @ sockjs.js:730
initSocket @ socket.js:9
(anonymous) @ client:211
(anonymous) @ index.js?http://0.0.0.0:0:254
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:0 @ vendor.bundle.js:6905
__webpack_require__ @ inline.bundle.js:55
0 @ main.bundle.js:1882
__webpack_require__ @ inline.bundle.js:55
webpackJsonpCallback @ inline.bundle.js:26
(anonymous) @ main.bundle.js:1
4zone.js:388 Uncaught (in promise) TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at serialize (index.js:752)
    at BeaconTransport.eval (index.js:2842)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BeaconTransport.captureEvent (index.js:2839)
    at BrowserBackend.eval (index.js:2984)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at BrowserBackend.sendEvent (index.js:2959)
    at BrowserClient.eval (baseclient.js:157)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at eval (tslib.es6.js:71)
    at new ZoneAwarePromise (zone.js:891)
    at Object.__awaiter (tslib.es6.js:67)
    at eval (baseclient.js:156)
    at BrowserClient.eval (baseclient.js:334)
    at step (tslib.es6.js:97)
    at Object.eval [as next] (tslib.es6.js:78)
    at fulfilled (tslib.es6.js:68)
    at ZoneDelegate.invoke (zone.js:388)
    at Zone.run (zone.js:138)
    at eval (zone.js:872)
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at ZoneTask.invokeTask [as invoke] (zone.js:500)
    at invokeTask (zone.js:1540)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1566)

I also get the error @KevCJones mentioned in his last post. I tried switching vom raven-js to @sentry/[email protected]

Any news on this?

I get same error.

Hey guys, any move on this? I need to bring up the confidence in the tool or we'll have to move away...

I get same error.

My stack:
"@angular/animations": "^7.2.0",
"@angular/cdk": "^7.2.1",
"@angular/common": "^7.2.0",
"@angular/compiler": "^7.2.0",
"@angular/core": "^7.2.0",
"@angular/flex-layout": "^7.0.0-beta.23",
"@angular/forms": "^7.2.0",
"@angular/http": "^7.2.0",
"@angular/material": "^7.2.1",
"@angular/platform-browser": "^7.2.0",
"@angular/platform-browser-dynamic": "^7.2.0",
"@angular/router": "^7.2.0",
"@auth0/angular-jwt": "^2.1.0",
"@sentry/browser": "^4.5.0",
"@types/awesomplete": "^1.1.8",
"core-js": "^2.6.2",
"hammerjs": "^2.0.8",
"rxjs": "^6.3.3",
"tslib": "^1.9.3",
"typescript": "~3.2.2",
"zone.js": "^0.8.27"

Sorry about this issue guys but are you able to provide a small repro case for this?
We have tests in place that test for this so we need to be able to reproduce this in order to fix it.

Also please make sure to use the latest version > 4.5.0

I tried it with a clean angluar 7 project, not doing more than here locally:
https://codesandbox.io/s/jpm71lq17w

Works without any issues. Please provide a repro case.

I can't upgrade to 7 just yet, but I'll give the latest version a drive and
see if it's resolved.

On Tue, 15 Jan 2019, 14:42 Daniel Griesser <[email protected] wrote:

I tried it with a clean angluar 7 project, not doing more than here
locally:
https://codesandbox.io/s/jpm71lq17w

Works without any issues. Please provide a repro case.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/getsentry/sentry-javascript/issues/1798#issuecomment-454415368,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAqe8Lr7L5XA-pL2UgPe_BTJnaBlvpeCks5vDejagaJpZM4ZRsY8
.

@HazAT follow an example reproducing the error: https://github.com/candidosales/sentry-error

@candidosales Thanks for the repro case, confirmed, also crashes for me.

4.5.2 has been released, this version should fix the issue. Closing this for now.

@HazAT I made upgrade the version to 4.5.2, stopped the error looping but I don't receive the errors in my account. Can you verify?

https://github.com/candidosales/sentry-error

@candidosales Hey, was trying your example app and the error wasn't sent :|

But I found the issue and fixed it, sorry about that, see: https://github.com/getsentry/sentry-javascript/pull/1842

@HazAT When will publish the new version with the fix?

Just to also update this here, version 4.5.3 fixed this issue.

What about raven-js package ? our team got the same problem, should we switch to @sentry/browser ?

@92hackers Since raven-js is already deprecated and will only receive critical bugfixes I would say give @sentry/browser a shot.
There are code changes necessary but it should be trivial to switch over.
Here are some migration cases: https://github.com/getsentry/sentry-javascript/releases/tag/4.0.0

Keep in mind 4.6.4 is the latest current version. Version 5.0.0 will be released soon but there are no code changes.

Was this page helpful?
0 / 5 - 0 ratings