raven-js infinite loop on errors in angular html template
What is the current behavior? I have raven-js setup according to the guide here (angular-cli) https://docs.sentry.io/clients/javascript/integrations/angular/
If I have something like this in one of my html files
<div *ngIf="contact.propertyThatDoesNotExist.value == true"></div>
Normally this would log something like Cannot read property 'value' of undefined to the console, but I will get an infinite loop of calls to RavenErrorHandler.handleError().
What is the expected behavior? That the error is logged once. Right now it causes an infinite loop of calls to handleError().
Using "raven-js": "3.17.0" with "zone.js": "0.8.16".
Does this have to do with the zone.js error described in #1016 ? But I'm not using 0.8.17?
Tried to create a plunkr with this, but failed unfortunately.. What more info do you need? Thank you!
This bug has been introduced in 0.8.17, so it shouldn't affect you (although, are you sure that you've locked dependencies and npm doesn't install 0.8.17 itself?).
What I'd do to exclude zone.js from the equation, is using their master branch and test it locally.
In you package.json change zone.js entry to:
"zone.js": "[email protected]:angular/zone.js.git#7ef13a734639690bd3c649ab48682002d3c3a18d
Remove all lock files, node_modules directory, reinstall and see if this changes anything.
I have tried that now, but I still get the same error. I have created and attached a minimal angular-cli project. The only changes I've done is that I added the raven-js setup, copied the contents of project.json from my project, and introduced the bug that triggers the loop in app.component.html. I have also obfuscated the sentry url in app.module.ts. So all you need to do is change the url, run npm install and then ng serve and the bug should be visible.
Updated to the newly released zone.js 0.8.18, but I still get the same behaviour unfortunately..
Investigation. Closing this one in favour of one cumulative issue https://github.com/getsentry/raven-js/issues/1064