Comments (9)
Was not able to replicate with just Vite on a smaller project so kept looking, after a while I've identified that the issue was not vite itself but rather that the differently generated vite file after going through cloudflare js minification lost a line.
After turning off this minification sourcemapping works.
from sentry-javascript-bundler-plugins.
Hi, this sounds more like a vite bug tbh. Was there any particular reason you reported it here we should look into? Would you mind opening an issue in the vite repository? We can also chime in and help troubleshoot. Ideally with reproduction.
from sentry-javascript-bundler-plugins.
@lforst
Was there any particular reason you reported it here we should look into?
I guess the reason is lack of knowledge on how sourcemapping, vite, sentry vite work together (what does what), my assumption was that sentry is the one that is generating sourcemaps and that a minor version bump of vite could not break this, but your comment makes me think now that vite does the generation and sentry plugin only does the uploading, maybe something more. Do you have any resources for me to understand the responsibilities of each package better ?
Would you mind opening an issue in the vite repository?
I could do that for sure but i am not sure how to check if generated sourcemaps are good or not how could i do that without using sentry. I mean i can generate sourcemaps by running production build locally but i dont know how to tell if the issue is reproduced or not any tips or resources for me to be able to figure this out ? I would like to track down the exact change on vite that resulted in this bug then.
from sentry-javascript-bundler-plugins.
Was there any particular reason you reported it here we should look into?
I guess the reason is lack of knowledge on how sourcemapping, vite, sentry vite work together
Totally fine, no blame on you 😄. Vite (and also potentially some vite plugins you have installed) is the one generating the source maps. My suspicion is that vite introduced a regression generating source maps in a patch of theirs. The Sentry vite plugin only picks up the generated source maps and uploads them to Sentry.
Would you mind opening an issue in the vite repository?
I could do that for sure but i am not sure how to check if generated sourcemaps are good or not how could i do that without using sentry.
I usually use https://sokra.github.io/source-map-visualization/ or https://marketplace.visualstudio.com/items?itemName=colder.source-map-visualization to verify sourcemaps. You could also do a prod build locally and try and see your assets in the browser-dev tools.
I think if you provide the Vite folks with a test app that shows right sourcemaps for version A and wrong sourcemaps for version B, they're already gonna be pretty happy.
from sentry-javascript-bundler-plugins.
Actually i found that on one of our projects we didnt even bump vite, on package-lock the version stayed the same, and only esbuild was changed in package-lock.json and it broke , does that point to an issue with esbuild then ? how could that be ?
from sentry-javascript-bundler-plugins.
Potentially yes.
from sentry-javascript-bundler-plugins.
@lforst i am having quite a bit of trouble identifying / pinpointing the issue
what i found is that the generated sourcemaps seem to have a line missmatch, so lets say raw stacktracke says
: 13: 46048
in sourcemap line 13 is empty but you can actually find the source if you just go to
: 14: 46048 this ends up being the source of the error
any ideas on what could be causing this
from sentry-javascript-bundler-plugins.
Did you report the issue to the vite folks? I really recommend directing the discussion there. Also, what browser are you using? (exact version) Some browsers have off-by one errors in their stack traces. Could also be something like an off-by one in vite.
from sentry-javascript-bundler-plugins.
Created the bug on Vite
from sentry-javascript-bundler-plugins.
Related Issues (20)
- `moduleMetadata` and or `moduleMetadataIntegration` do not work with `vite-plugin` HOT 6
- Source Maps not loading on sentry HOT 15
- Unclear how to make Sentry work with Vite + React sourcemaps HOT 4
- Nuxt with sentryVitePlugin: Cannot read properties of undefined (reading 'startsWith') HOT 5
- Vite plugin logging to stdout instead of stderr HOT 2
- Cannot build with Vite and latest sentry plugin version HOT 10
- sentry does not consider sourcemaps HOT 5
- esbuild plugin causing error in Nx Angular CLI (angular 17) HOT 1
- `filesToDeleteAfterUpload` is deleting files before upload in latest versions HOT 4
- can not disable soucemap HOT 3
- sentry/webpack-plugin upload sourcemap oom HOT 5
- Sentry sourcemap use `@vitejs/plugin-legacy` and `@sentry/vite-plugin` conflict. HOT 16
- JavaScript heap out of memory, after adding Sentry to my Vite-React Project - GitLab HOT 3
- Invalid org token in Vite build HOT 2
- vite-plugin Docs should provide guidance and exmaples for removing source maps after upload HOT 1
- Sentry Webpack Plugin `Warning: Didn't find any matching sources for debug ID upload.` HOT 6
- sentry-file-deletion-plugin writeBundle hook Error in v2.21.0 HOT 11
- sentry webpack plugin Fatal process out of memory: Zone HOT 4
- Is there a plan to support the Sentry Rspack plugin in the future? HOT 3
- Sentry source maps completely incorrect and showing sentry debug stuff? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-javascript-bundler-plugins.