-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
-
Hi,
We have been using Sentry for a few years, however, since the beginning we always had the same problem.
Lots of reported errors do not have stack traces, and we are not sure why. We assume that it might be because they are from external scripts plugged in by Google Tag Manager, but we are not sure.
So we also assumed that if the error does not have a stack trace, it's not coming from our codebase, and it's not our (developers) problem, but it's a business problem. :)
Are we right? Is there any chance to improve it, and debug even errors without a stack trace? I'm attaching a few examples
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
I would recommend setting up Sentry Session Replay, which can help debug why these errors without a stacktrace are happening.
We can only attach a stacktrace if the error thrown in the browser provides one, so these are cases where the error from the browser are not helpful :(
One thing that may be helpful is to emit more breadcrumbs in your application with Sentry.addBreadcrumb. This will help you understand what exactly was happening before the error occured (or if nothing happened at all - then it's probably a chrome extension or something similar causing issues).
Beta Was this translation helpful? Give feedback.
All reactions
-
Also have this problem, I don't believe I am throwing any strings anywhere in the code base, however I still do not seem to have stack traces.
I would like to still get stack traces even though my code is minified. I also don't want to enable source maps with the Vite plugin as I believe it makes my unminified source code publicly visible. Happy to be corrected if I'm wrong.
Beta Was this translation helpful? Give feedback.
All reactions
-
@AlastairTaft you can use the sourcemaps.filesToDeleteAfterUpload in the vite plugin to delete sourcemap files after you upload them to sentry so they won't get exposed publically.
We really recommend uploading sourcemaps, it vastly improves the sentry experience.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks AbhiPrasad, the way it looked like it worked though is it was using inline sourcemaps, so it was embedding the sourcecode at the end of the minified files. I'll admit I didn't spend long looking at it, I panicked that my IP was all public and disabled it immediately.
Beta Was this translation helpful? Give feedback.