Closed georgiosd closed 1 year ago
Source maps are only uploaded on Vercel if the deployment target is production. Source maps will not be uploaded for preview or development environments. Could this be the case for you?
It is, but thats unintended behavior- we use preview environments for acceptance testing and sentries really need meaningful stack traces to be useful.
Is there a way to customize that?
On Sat, 7 Jan 2023 at 13:42, Luca Forstner @.***> wrote:
Source maps are only uploaded on Vercel if the deployment target is production. Source maps will not be uploaded for preview or development environments. Could this be the case for you?
— Reply to this email directly, view it on GitHub https://github.com/getsentry/sentry-javascript/issues/6675#issuecomment-1374452101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMYG5X42YAIW76CCGTU2F3WRFJCRANCNFSM6AAAAAATTJVZAY . You are receiving this because you authored the thread.Message ID: @.***>
As of now, there is a hacky way to do it. You could manually set disableServerWebpackPlugin
and disableServerWebpackPlugin
to false, depending on whether you want source maps uploaded or not.
I agree though that this UX is kinda crappy though and we should think of something better here.
@lforst Thank you. This is new right? I'd say at the very least add to docs and/or samples...
@georgiosd These options? No they've been around for a while and are also part of the docs.
I would swear this wasn't a problem before - we have several NextJS apps (this particular one is new). Maybe we're running on old SDKs?
Re docs, I meant it would be good to connect these two options with some sort of environment check...
PRs are always welcome!
Definitely open to that - can you please point me in the right direction on where I'd suggest that edit?
https://github.com/getsentry/sentry-docs is the place!
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
@lforst just revisiting this - I guess the change should go to https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/?original_referrer=https%3A%2F%2Fduckduckgo.com%2F#configure-source-maps ?
Can you confirm the defaults are these?
disableServerWebpackPlugin: true,
disableClientWebpackPlugin: true,
Or is there some other logic?
EDIT
I did find the logic related to this and it seems that both plugins are activated by default: https://github.com/getsentry/sentry-javascript/blob/5543808adf70280b0154a4e7c1d446f2b171c07d/packages/nextjs/src/config/webpack.ts#L813
But then it doesn't make sense I am having this problem.
What am I missing here?
If you update everything to the newest version and provide all the necessary environment variables you should get source mapped events on preview environments now.
Ok, thank you!
On Mon, 22 May 2023 at 17:57, Luca Forstner @.***> wrote:
If you update everything to the newest version and provide all the necessary environment variables you should get source mapped events on preview environments now.
— Reply to this email directly, view it on GitHub https://github.com/getsentry/sentry-javascript/issues/6675#issuecomment-1557372325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMYG5Q76DLPFBMF4W6FP23XHN5GXANCNFSM6AAAAAATTJVZAY . You are receiving this because you were mentioned.Message ID: @.***>
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.29.0
Framework Version
React 17.0.2, Next 12.3.4
Link to Sentry event
No response
Steps to Reproduce
I have set all
SENTRY_*
env vars on Vercel, and I even tried copying them locally and running the build. It creates the release and upload the source maps to Sentry just fine. When I push code and the build runs on Vercel, nothing.I read through all the issues I could find, but didn't find anything that worked or seemed relevant. The build succeeds without any issues.
My
next.config.js
:Typical Vercel build log (reduced):
Expected Result
Creates release and uploads source map.
Actual Result
No release (this used to happen before I upgraded Sentry) and no source maps uploaded, as per Source Maps view in Sentry.