Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry integration #144

Open
daroczig opened this issue Jul 3, 2024 · 0 comments
Open

Sentry integration #144

daroczig opened this issue Jul 3, 2024 · 0 comments

Comments

@daroczig
Copy link

daroczig commented Jul 3, 2024

Is your feature request related to a problem? Please describe.

It's difficult to debug Angular SSR errors on Netlify Edge.

Sometimes, we see odd errors in the SSR Edge Function logs, e.g.:

Jun 25, 12:10:36 AM: 01J164T3 error  [Angular SSR] ERROR TypeError: Cannot read properties of undefined (reading 'get')
    at ho (file:///root/dist/sc-www/server/chunk-WQQCIBV7.mjs:193:2619)
    at e.ngOnInit (file:///root/dist/sc-www/server/chunk-WQQCIBV7.mjs:198:124362)
    at Yd (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:10817)
    at KD (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:10963)
    at Ph (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:10724)
    at ai (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:10452)
    at VE (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:41439)
    at sc (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:42495)
    at jE (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:41038)
    at $p (file:///root/dist/sc-www/server/chunk-L7LMYR6S.mjs:8:40931)

It runs fine when running the Angular app on localhost (with Express), but fails on Edge.
After painful shotgun debugging, we managed to figure out what is undefined on Edge,
and made adjustments in our codebase, but it would be much easier to get a proper traceback.

We tried to compile with source maps, but that did not improve the above traceback.

A potential solution might be submitting the error to Sentry where we can upload the source maps.

Describe the solution you'd like

It would be great to see a full traceback for debugging purposes. It could be in the Edge logs, or Sentry.

Describe alternatives you've considered

I don't think we can solve this without updates in angular-runtime. We tried to compile source maps in the PR preview deployments, but did not help the readability of the above traceback.

Additional context

See the above example error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants