Angular2 - raven-js doesen't logs all errors

Hello. When i’m using sentry/raven-js with angular2 i don’t have full stacktrace. For example in sentry i have this error logged:

    TypeError: Cannot read property 'length' of undefined
  at _View_CommentComponent0.AppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9470:18)
  at _View_CommentComponent0.DebugAppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9575:48)
  at _View_WallPostComponent6.AppView.detectViewChildrenChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9496:23)
  at _View_WallPostComponent6.AppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9470:18)
  at _View_WallPostComponent6.DebugAppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9575:48)
  at _View_WallPostComponent0.AppView.detectContentChildrenChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9488:23)
  at _View_WallPostComponent0.AppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9470:18)
  at _View_WallPostComponent0.DebugAppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9575:48)
  at _View_WallPostComponent_Host0.AppView.detectViewChildrenChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9496:23)
  at _View_WallPostComponent_Host0.AppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9470:18)
  at _View_WallPostComponent_Host0.DebugAppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9575:48)
  at _View_AppComponent0.AppView.detectContentChildrenChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9488:23)
  at _View_AppComponent0.AppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9470:18)
  at _View_AppComponent0.DebugAppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9575:48)
  at _View_AppComponent_Host0.AppView.detectViewChildrenChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9496:23)
  at _View_AppComponent_Host0.AppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9470:18)
  at _View_AppComponent_Host0.DebugAppView.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:9575:48)
  at ViewRef_.detectChanges(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:7582:24)
  at eval(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:7003:88)
  at ApplicationRef_.tick(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:7003:42)
  at eval(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6944:109)
  at ZoneDelegate.invoke(eval at <anonymous> (http://localhost:8080/polyfills.js:2799:2), <anonymous>:232:26)
  at Object.onInvoke(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6158:41)
  at ZoneDelegate.invoke(eval at <anonymous> (http://localhost:8080/polyfills.js:2799:2), <anonymous>:231:32)
  at Zone.run(eval at <anonymous> (http://localhost:8080/polyfills.js:2799:2), <anonymous>:114:43)
  at NgZoneImpl.runInner(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6185:75)
  at NgZone.run(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6414:70)
  at Object.next(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6944:85)
  at SafeSubscriber.schedulerFn [as _next](eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6088:74)
  at SafeSubscriber.__tryOrUnsub(eval at <anonymous> (http://localhost:8080/vendor.js:130:2), <anonymous>:223:16)
  at SafeSubscriber.next(eval at <anonymous> (http://localhost:8080/vendor.js:130:2), <anonymous>:172:22)
  at Subscriber._next(eval at <anonymous> (http://localhost:8080/vendor.js:130:2), <anonymous>:125:26)
  at Subscriber.next(eval at <anonymous> (http://localhost:8080/vendor.js:130:2), <anonymous>:89:18)
  at EventEmitter.Subject.next(eval at <anonymous> (http://localhost:8080/vendor.js:106:2), <anonymous>:55:25)
  at EventEmitter.emit(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6080:80)
  at NgZone._checkStable(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6324:48)
  at NgZoneImpl.onLeave(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6296:27)
  at Object.onInvokeTask(eval at <anonymous> (http://localhost:8080/vendor.js:100:2), <anonymous>:6152:31)
  at ZoneDelegate.invokeTask(eval at <anonymous> (http://localhost:8080/polyfills.js:2799:2), <anonymous>:264:40)
  at Zone.runTask(eval at <anonymous> (http://localhost:8080/polyfills.js:2799:2), <anonymous>:154:47)
  at XMLHttpRequest.ZoneTask.invoke(eval at <anonymous> (http://localhost:8080/polyfills.js:2799:2), <anonymous>:335:33)

From this error i don’t know anything. But when I disable raven i got in my chrome console this log + information like “Error in comment.component template line 8:16” and i know now everything :wink:
Is possible to capture all angular errors not only one “main” error?

Sorry for my terrible english,
Kamil Sampolski aka Sierran

Right. We capture the originalError instead of the “Angular” error, which can contain Angular-pertinant information like what you posted.

Can you open an issue on raven-js? We’d be glad to investigate further / make a change.

Thank you for response. I will create issue right now.