matomo icon indicating copy to clipboard operation
matomo copied to clipboard

Support Error report with in Angular framework

Open VincentCoucharriere opened this issue 1 year ago • 3 comments

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 ?

Summary

Your Environment

  • Matomo Version: latest (cloud)
  • Angular Version: 10+

VincentCoucharriere avatar Jul 22 '22 16:07 VincentCoucharriere

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.

bx80 avatar Jul 24 '22 23:07 bx80

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

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

heurteph-ei avatar Aug 08 '22 13:08 heurteph-ei

@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.

sgiehl avatar Aug 08 '22 15:08 sgiehl