Closed GorlikItsMe closed 6 days ago
Assigning to @getsentry/support for routing ⏲️
Hi, could you please paste your build output logs? Thanks for the reproduction repo, we'll take a look.
I have tried out your repo but cannot reproduce this issue. Do you have your SENTRY_AUTH_TOKEN
set in .env
?
Hi, could you please paste your build output logs? Thanks for the reproduction repo, we'll take a look.
Full build logs:
PS D:\temp\nextjs-and-sentry-dont-work> npm run build
> nextjs-and-sentry-dont-work@0.1.0 build
> next build
▲ Next.js 14.2.5
- Environments: .env
- Experiments (use with caution):
· instrumentationHook
Creating an optimized production build ...
[@sentry/nextjs - Node.js] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Node.js] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[@sentry/nextjs - Edge] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Edge] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[@sentry/nextjs - Client] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Client] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (6/6)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ○ / 5.52 kB 188 kB
├ ○ /_not-found 1.02 kB 183 kB
├ ƒ /api/sentry-example-api 0 B 0 B
└ ○ /sentry-example-page 2.03 kB 184 kB
+ First Load JS shared by all 182 kB
├ chunks/449-d179011c12838fef.js 89.9 kB
├ chunks/52774a7f-ab0852fb3e7c5017.js 35.9 kB
├ chunks/fd9d1056-1ddaa04915180e67.js 53.8 kB
└ other shared chunks (total) 2.54 kB
○ (Static) prerendered as static content
ƒ (Dynamic) server-rendered on demand
Machine: win10
Do you have your
SENTRY_AUTH_TOKEN
set in.env
?
Yes token is saved in .env
I removed just for test and saw different error:
[@sentry/nextjs - Node.js] Warning: No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
Soo sentry can reach token.
Also there is screenshot what I can see in dashboard
hey @GorlikItsMe, we had another look at this and it looks like it's an issue with how we use glob
in combination with you being on Windows. We filed a new issue to tackle this.
I have a same problem with sourcemaps, before nextJS I used a only @sentry/webpack-plugin and it works, In documentation is that @sentry/nextjs has this lbb under the hood. So I dont know where the problem is :-(
@Merynek are you on Windows too?
Now I tried to run build using WSL The result is the same - sentry can't find any matching sources (Yes I removed node_modules and .next before testing)
@Merynek are you on Windows too?
Yes!, but on CI/CD is linux so, mby its not the system problem
@Merynek do you have a reproduction repo for that?
I was following along with the workshop today and I've been running into the same issue with the same error messages. My setup is practically the same (see below). I've confirmed that the .js.map
files are both created and the corresponding .js
files have the //# sourceMappingURL=...
at the end of the file. For what it's worth, I'm on Windows 10 using Node v20.
[@sentry/nextjs - Node.js] Info: Using environment variables configured in ".env.sentry-build-plugin".
[@sentry/nextjs - Node.js] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Node.js] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[@sentry/nextjs - Edge] Info: Using environment variables configured in ".env.sentry-build-plugin".
[@sentry/nextjs - Edge] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Edge] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[@sentry/nextjs - Client] Info: Using environment variables configured in ".env.sentry-build-plugin".
[@sentry/nextjs - Client] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[@sentry/nextjs - Client] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
EDIT: I ran this entire setup through WSL (Ubuntu 22.04) a moment ago and the sourcemaps upload successfully and the client code is viewable as intended, so, at least for me, this seems to be related to #13288.
@dually8 thanks for providing more info. I'll take a look at fixing this for windows.
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
I want to add sentry to my next.js project
How are you getting stuck?
For some reason sentry cant upload sourcemaps during build time. Because of that, you cant see the source code in the sentry dashboard.
I created example repository: https://github.com/GorlikItsMe/nextjs-sentry-dont-work
When i enabled logs (
silent: false
in next.config.mjs) i saw this:Thank you in advance for any advice
Where in the product are you?
Unknown
Link
No response
DSN
No response
Version
No response