You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NextJS package does not upload source-maps on WINDOWS #4829
I'm not sure what I'm supposed to see either to confirm they get uploaded or not.
I've manually configured a release version in the sentry.client/server.config.js files to see if that was the issue, and that didn't change anything. All it did was make an empty release bucket with no artifacts.
I've tried setting the SENTRY_RELEASE environment variable using cross-env and a .env file (in separate attempts) and they both did nothing.
I've tried manually setting the release field in the sentryWebpackPluginOptions as well to see if the sentry-webpack-plugin needed it, and that did nothing.
I've watched the netlify and vercel videos on sentry's youtube channel, and they both just refer to some netlify or vercel plugin to handle it. But the docs clearly state that @sentry/nextjs will automatically handle the sourcemap uploads! I am completely at a loss. I see 0 output, no errors, no warnings, nothing.
Reacted by Shea Belsky, kvd, Matvey Kottsov and Yasir Ahmed Ghouri
I posted a similar question to this a few days ago: #4812
There's a lack of clarity on how Sentry sourcemaps are supposed to be handled for a CI/CD environment on Next.js apps. Not every Next.js app runs on Vercel, and documentation/clarity for how other CI/CD platforms are intended to work would be great.
Hey, thanks for writing in. Great feedback - we recognize that our documentation can be improved for non-vercel environments for NextJS, appreciate the further context though. I'll be backlogging this as a documentation task for us to work on.
Hi @AbhiPrasad, thanks for taking the time to review my post :)
I want to note that I did already try configuring it with the sentry.properties and .sentryclirc file mentioned in your link. I've generated an auth token with the default permissions + project_write just in case, and that is what I set in the .sentryclirc file.
To my eyes, it looks like it matches the requirements of the CLI configuration steps outlined in the docs: SENTRY_URL, SENTRY_ORG, SENTRY_PROJECT, SENTRY_AUTH_TOKEN
@AbhiPrasad I've tested the exact same workflow now on an Ubuntu VM, and confirmed that it does try to upload there. I shared my branch with a coworker who runs on Mac and also verified it tries to run there, so it looks like specifically it doesn't work on windows.
Looks like there is a potentially relevant bug here: #4720
But I have WSL installed, so I don't think that is the issue here. Any thoughts? I feel this is now an actual bug and not just a documentation issue, unless Windows support for the @sentry/nextjs package isn't intended.
@kamilogorek the webpack plugin/sentry-cli should work fine in Windows or WSL right?
Yes, it should work just fine in most environments, including windows.
Can you set SENTRY_LOG_LEVEL=debug env variable and run the build again? It should produce more verbose output. However, I don't see you providing any logs so far, so I'm not sure if there is a problem with printing anything to the console or you just don't see any logs?
But it does not, at this location. However sentry-cli is at node_modules/@sentry/cli/bin/sentry-cli and node_modules/.bin/sentry-cli
@h0gar - node_modules/@sentry/cli/bin/sentry-cli is the JS wrapper, whereas node_modules/cli/sentry-cli is the actual binary, which is what's being looked for in that function.
Activity
SheaBelsky commentedon Mar 31, 2022
I posted a similar question to this a few days ago: #4812
There's a lack of clarity on how Sentry sourcemaps are supposed to be handled for a CI/CD environment on Next.js apps. Not every Next.js app runs on Vercel, and documentation/clarity for how other CI/CD platforms are intended to work would be great.
AbhiPrasad commentedon Mar 31, 2022
Hey, thanks for writing in. Great feedback - we recognize that our documentation can be improved for non-vercel environments for NextJS, appreciate the further context though. I'll be backlogging this as a documentation task for us to work on.
You'll have to use config files or environmental variables (like Sentry auth token, org name, project name) to configure Sentry CLI to upload the assets: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-sentry-cli
You can get more details on the Sentry Auth Token and how it's generated here: https://docs.sentry.io/product/cli/configuration/#to-authenticate-manually
yoont4 commentedon Apr 1, 2022
Hi @AbhiPrasad, thanks for taking the time to review my post :)
I want to note that I did already try configuring it with the
sentry.propertiesand.sentryclircfile mentioned in your link. I've generated an auth token with the default permissions +project_writejust in case, and that is what I set in the.sentryclircfile.Here is what I have in my
sentry.propertiesfile:and this is how my
.sentryclircfile looks:To my eyes, it looks like it matches the requirements of the CLI configuration steps outlined in the docs:
SENTRY_URL, SENTRY_ORG, SENTRY_PROJECT, SENTRY_AUTH_TOKENIs there something I am missing?
[-]NextJS package does not upload source-maps[/-][+]NextJS package does not upload source-maps on WINDOWS[/+]yoont4 commentedon Apr 2, 2022
@AbhiPrasad I've tested the exact same workflow now on an Ubuntu VM, and confirmed that it does try to upload there. I shared my branch with a coworker who runs on Mac and also verified it tries to run there, so it looks like specifically it doesn't work on windows.
Looks like there is a potentially relevant bug here: #4720
But I have WSL installed, so I don't think that is the issue here. Any thoughts? I feel this is now an actual bug and not just a documentation issue, unless Windows support for the
@sentry/nextjspackage isn't intended.AbhiPrasad commentedon Apr 4, 2022
#4720 is related to SDK development - I don't think it applies here. I think you're right it could be more than a docs issue - I'll expand the scope.
The issue might be with https://github.com/getsentry/sentry-webpack-plugin (which is what the NextJS SDK uses under the hood) or https://github.com/getsentry/sentry-cli/ (which does the actual uploading of source maps).
@kamilogorek the webpack plugin/sentry-cli should work fine in Windows or WSL right?
kamilogorek commentedon Apr 4, 2022
Yes, it should work just fine in most environments, including windows.
Can you set
SENTRY_LOG_LEVEL=debugenv variable and run the build again? It should produce more verbose output. However, I don't see you providing any logs so far, so I'm not sure if there is a problem with printing anything to the console or you just don't see any logs?karlvd commentedon May 27, 2022
I experienced the same problem and could narrow it down to v 6.17.0
Running ~6.16.0 works and will output a log during build like
`
With ~6.17.0 and above there is no output at all with SENTRY_LOG_LEVEL=debug
A temporary solution is to downgrade to ~6.16.0
h0gar commentedon Aug 30, 2022
Same problem here with @sentry/nextjs 7.11.1. It does not upload on Windows but it does on Ubuntu.
It checks if the file exists "node_modules/@sentry/cli/sentry-cli" exists: https://github.com/getsentry/sentry-javascript/blob/master/packages/nextjs/src/config/webpack.ts#L447
But it does not, at this location. However sentry-cli is at node_modules/@sentry/cli/bin/sentry-cli and node_modules/.bin/sentry-cli
Just replacing "@sentry/cli/sentry-cli" with "@sentry/cli/bin/sentry-cli" in webpack.ts makes it work on Windows.
grefrit commentedon Sep 3, 2022
Any updates on this? Core feature doesn't work on biggest desktop OS
lobsterkatie commentedon Oct 28, 2022
@h0gar -
node_modules/@sentry/cli/bin/sentry-cliis the JS wrapper, whereasnode_modules/cli/sentry-cliis the actual binary, which is what's being looked for in that function.