-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
(nextJS) Strange stack traces without file extensions #8501
Comments
We chatted offline about this and the solution seems to be to make sure that the user changes to use the same setup generated by the Sentry Next.js wizard. That is they will:
|
@AbhiPrasad Thanks! Would the CLI just not work in this case? |
@sergiosentry if you wrap the config with |
We are also seeing this stack trace weirdness, and are using the stock nextJS setup with |
@AbhiPrasad Thanks! it seems that it still does not work even when wrapping the config with |
@sergiosentry in the example above, you've disabled the webpack plugin. This will prevent sourcemaps uploading from happening. See: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#disable-sentrywebpackplugin
|
Based on the repro that was initially shared, I was able to reproduce a very similar issue (here) where the stack trace had a weird path (In my case, there might also been a problem with a missing source map but it is still weird that the SDK did not upload all mapping files automatically My understanding is that the nextJS SDK calls the
can anyone confirm that the |
@serglom21 To upload the sourcemaps for the clientside that is not inside I know this is hella opaque and not well documented, however this option has a long history and we need it since historically uploading everything in As for the |
After some back and forths with the customer who reported the above issue, we were able to figure out most of the sourcemaps issues by getting them to use the nextjs sdk and upload sourcemaps via the sdk's built-in webpack plugin. The only remaining issue was with It seems that these errors are being caused by google tag manager (gtm) scripts. It seems we can also identify that there is some google translate extensions/plugin that is the reason why it's happening. This affects everybody, including us. There is no way we will ever be able to provide meaningful stack traces for these errors. My theory - google translate is injecting in a 2nd copy of google tag manager that is conflicting with the user's provided google tag manager, but cannot confirm without a repro. For now I recommend ignoring this error as it's inactionable. This can be done by filtering out |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.45.0
Framework Version
NextJS 12.2.2
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
Repo shared by customer hosted here https://github.com/sergiosentry/sentry-nextjs
NOTE: This setup was created without using the sentry wizard
Expected Result
I expect the Sentry event stack trace to have frames that point to the file where the error was thrown with the file extension
Like this one:
Actual Result
I get a weird looking stacktrace with the following path format which is not useful to me
This is some of the metadata captured with the event that might help understand where this is coming from

I am happy to share a link to a sample event internally since this is being opened on behalf of the customer and I would have to link the customer's instance.
┆Issue is synchronized with this Jira Improvement by Unito
The text was updated successfully, but these errors were encountered: