@VincentCoucharriere opened this Issue on July 22nd 2022

I seems that Angular framework caches and handles "uncaught" JS error / exception : new Error('my error')
This prevents Matomo from catching & reporting these errors.
How to solve this ?
Can you please take care of this ?


Your Environment

  • Matomo Version: latest (cloud)
  • Angular Version: 10+
@bx80 commented on July 24th 2022 Contributor

Hi @VincentCoucharriere, thanks for your question. We're in the process of migrating Matomo from AngularJS to Vue.js which should resolve this issue.

Could you explain a bit about what you are trying to achieve by catching JavaScript errors? If you are experiencing a JavaScript error with Matomo cloud then I'd recommend contacting support. If you are developing a plugin or making code changes then it's possible to define an AngularJS exception handler to catch and log errors.

@heurteph-ei commented on August 8th 2022

@bx80 @VincentCoucharriere, wouldn't it be about this option (in MTM):

(then this topic should be moved into the MTM project)

@sgiehl commented on August 8th 2022 Member

@heurteph-ei Guess it is a bit unclear what the issue actually was about. If it is about catching and tracking javascript errors on a website, then it might be correct here. Matomo currently appends an onError handler to track possible javascript errors.
If Angular or other frameworks might catch there errors themself and the error handler is not triggered, then Matomo currently can't track it.
But if Angular provides a possibility to hook into their error handling, one could even track the javascript error event manually.

Powered by GitHub Issue Mirror