Open flowen opened 1 year ago
Copying in a comment from one of the engineers at Netlify:
I took a quick look at this and unfortunately I haven't seen this error before, and I wasn't able to find something indicating NextJS had changed how source maps are handled recently that might have caused this.
I'm not the most familiar with the codebase for the existing netlify build plugin for Sentry, but my initial instinct is this might have something to do with how the NextJS routing works and it's not playing nice with what the plugin/Sentry is expecting.
Because NextJS outputs source file maps in the same place as the source code, the 'partially matching filename' mentioned in the Github issue:
~/static/chunks/framework-0ba0ddd33199226d.js
is where the source map correctly lives if we were looking in the file explorer and the missing artifact entry:
~/_next/static/chunks/framework-0ba0ddd33199226d.js
is what I would expect to see as a route if I was trying to navigate to that page in the browser and was looking at the request for that page network tab.
Environment
7.12.1
Steps to Reproduce
We just can't get the sourcemaps to work: It's a next.js app running on netlify.
I've been going through the sentry sourcemaps walkthrough: https://docs.sentry.io/platforms/javascript/guides/nextjs/sourcemaps/troubleshooting_js/
There's a couple of suspect things, but I can't pinpoint the bottle-neck.
sentry-cli sourcemaps explain dd8595f782254540987a1b49d12e2155 --org $ORG --project $OURPROJECT
isThere's a sourceMapUrlPrefix option but it, as it says, prefixes the URL and we end up with
~/$PREFIX/_next/static/chunks/framework-0ba0ddd33199226d.js
. I'm not sure what the word is, but we need to subtract part of the path.The artifact entries in Sentry confirm the paths