getsentry / sentry-javascript-bundler-plugins

JavaScript Bundler Plugins for Sentry
https://sentry.io
BSD 3-Clause "New" or "Revised" License
125 stars 32 forks source link

Source Maps not loading on sentry #544

Open monika-agg opened 1 month ago

monika-agg commented 1 month ago

I dont know if its a bug or i am doing something wrong, but i am trying to upload the sourcemaps.

Using self-hosted sentry version v2.11.0

i have first tried the legacy uploading methods But that did not work as well.

Then found another way by hosting publically all js files have the sourcemap URLs, But still no source maps are getting loaded or applied to the errors.

sentry project settings are as follows

Screenshot 2024-06-05 at 2 02 07 PM

can someone help and tell ma what i am doing wrong, why are the sourcemap not loading even after hosting publically?

lforst commented 1 month ago

Sadly we have very little information in this issue. Since version 2.11.0 is already quite old (assuming you mean 22.11.0) I would try upgrading Sentry as a first step and also look into the logs of the symbolicator container/service.

monika-agg commented 1 month ago

symbolicator sorry, for the version mistake. and Yes, the version is 22.11.0.

do i have to update sentry, even with the approach of publically hosting the sourcemap ?

Isn't there anything i can do on v22.11.0 only?

lforst commented 1 month ago

@monika-agg you don't have to upgrade when publicly hosting the sourcemaps but it will likely be easier to debug and you can also use newer methods of uploading source maps.

Isn't there anything i can do on v22.11.0 only?

The troubleshooting part is unfortunately up to you. Since you are self-hosted I can't give you much guidance simply because I have no insight into your setup. As I said, I recommend looking in the symbolicator logs.

MateuszGroth commented 1 month ago

I am also having issues with uploading sourcemaps to sentry. I am using the following packages

    "@sentry/cli": "2.32.1",
    "@sentry/webpack-plugin": "2.18.0",
    "@swc/core": "1.6.1",

[!CAUTION] ERROR failed to read input source map: failed to parse inline source map URL ./bmSWWllS1.map Caused by: relative URL without a base

MateuszGroth commented 1 month ago

The error does not happen on @swc/core@1.4.x

lforst commented 1 month ago

@MateuszGroth Ok that seems unrelated to the plugin though. I recommend opening an issue in the SWC repo.

MateuszGroth commented 1 month ago

@lforst I decided to start the conversation here since the sourcemaps seem to be generated correctly

lforst commented 1 month ago

But swc trips and not our plugin right? I don't quite see the connection yet 😄

MateuszGroth commented 1 month ago

The sentry vite plugin seems to work with that swc core version ;/

lforst commented 4 weeks ago

The Sentry vite plugin does not use SWC when building.

MateuszGroth commented 4 weeks ago

Vite on top of swc with the plugin works

lforst commented 4 weeks ago

@MateuszGroth can you please elaborate. None of this makes sense to me.

MateuszGroth commented 4 weeks ago

The question is, why Vite, using the swc bundler (1.6.1 @swc/core) works correctly with the@sentry/vite-plugin and the webpack + swc + @sentry/webpack-plugin configuration does not

MateuszGroth commented 4 weeks ago

Let me add that there are no errors when the @sentry/webpack-plugin plugin is not used.

lforst commented 4 weeks ago

I strongly recommend to share reproduction so we can look at this more closely.