Giter Club home page Giter Club logo

Comments (9)

bickauskaslaurynas avatar bickauskaslaurynas commented on July 24, 2024 1

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.

lforst avatar lforst commented on July 24, 2024

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.

bickauskaslaurynas avatar bickauskaslaurynas commented on July 24, 2024

@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.

lforst avatar lforst commented on July 24, 2024

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.

bickauskaslaurynas avatar bickauskaslaurynas commented on July 24, 2024

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.

lforst avatar lforst commented on July 24, 2024

Potentially yes.

from sentry-javascript-bundler-plugins.

bickauskaslaurynas avatar bickauskaslaurynas commented on July 24, 2024

@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.

lforst avatar lforst commented on July 24, 2024

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.

bickauskaslaurynas avatar bickauskaslaurynas commented on July 24, 2024

Created the bug on Vite

from sentry-javascript-bundler-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.