Sourcemap artifact not used

Hello!

We cannot seem to get our self-hosted Sentry (v. 8.10.0) to consider the uploaded sourcemaps when processing received events. When we inspect the error events in the GUI, the stacktraces are referring to lines and columns in the minified file.

Here’s a typical stacktrace in the GUI:

minified_stacktrace

As you can see, the references are to the minified bundle. Here’s the list of artifacts to that release:

sentry_artifacts

We interpret the documentation that it’s fine to have the name of the sourcemap as “~/”.

We’re uploading the minified bundle and the source map using the sentry-cli (v. 1.6.0) tool that you’ve provided using the following command:

It seems to work fine:

sentry_cli_output

The sourceMappingURL is in place at the end of the deployed bundle. Here’s a screenshot of the last line of the bundle on the server:

tail_of_bundle_server

We’ve found the following issues that relate to ours. Studying them has helped us somewhat, but we have not managed to resolve the issue yet.

Uploaded source map not being used (no response as of yet)
Can't use sourcemaps/artifacts

Have we missed some detail in the filenames or in our formation of the sourceMappingURL reference?

Or if everything seems ok, maybe the problem lies not with the upload but rather how we’ve configured our servers, like in the following issue

On a final note: it takes a long time (like 2 hrs) for the events to appear in the GUI. Is there a way to decrease this waiting time so that we get faster test iterations?

3 Likes

I’m having the exact same issue. Couldn’t find any solution for it yet

3 Likes

Alright!
We have not been able to resolve it yet, and have kinda given up for the time being.
But maybe now we can bump this thread, and get some attention!

1 Like

I’ve had the same exact issue described here!

Haven’t found a solution yet.

1 Like

We also have this issue and no solution in sight.

1 Like

@Krafty have you found a solution?

No, not yet unfortunately. But when we get back to it, and if we succeed, we’ll post any findings here!

My team and I have now unfortunately stopped looking into this, and are looking into other solutions. I wish you all luck!

Very strange to see Sentry ignoring the thread and not trying to help its cusomers.

This thread is marked as on-premise, which is not a product we sell, thus we’re not ignoring any customers. If you’re running Sentry yourself you are responsible for managing the installation, performance, and uptime.

If this is not related to on-premise, you can use the support options available here:

There are various tools in Sentry that should help you understand if source maps were used and why, but frankly the 8.10 release is significantly different than what we now run in production and doesn’t represent the current generation of functionality.

Try this, should help

I have sentry setup with the following:

App is served from https://app.com

Resources are like https://app.com/main.hash.js

I am not serving source maps from https://app.com
I have directly uploaded them as artifacts to sentry

In sentry’s /releases/<release_number>/artifacts/, I am able to see the following:
~/main.hash.js
~/main.hash.js.map

Now, my main.hash.js has the following sourceMappingURL comment:
//# sourceMappingURL=main.hash.js.map

Sentry shows my source map is available at https://app.com/main.hash.js.map

I have followed this doc https://docs.sentry.io/platforms/javascript/sourcemaps/#verify-artifact-names-match-sourcemappingurl-value and I understand that ~ is only a replacement for https://app.com

So, ~/main.hash.js.map should resolve to https://app.com/main.hash.js.map

This is not happening and I continue to see the minified file.
To verify if my source map is generated correctly, I tried deploying the source maps to my sandbox and sentry started mapping minified files to the source using source maps.

It all goes for a toss when i don’t deploy my source files to https://app.com

Please let me know if I am messing something up.

Thanks in advance :slight_smile:

1 Like

We have the exact same issue with our self hosted Sentry 9.1.1.

  • Uploaded both source and source map to sentry via cli.
  • Removed source map from public facing web
  • Uploaded artifacts where all path have their base url substituted with ~, which also matches the frame url of the events sent from sentry client.

But we are still seeing minified code in our issues.


I see no one mentioning this. We are also getting this error message on top of our events:

There were 2 errors encountered while processing this event

  • HTTP returned error response
    404

It reported a 404 error trying to obtain source map from our public facing website (which doesn’t exist because we hid them and uploaded them to our sentry directly)

I am puzzled by this error message as we uploaded source map directly into our hosted Sentry, so it shouldn’t be looking for source map from our public facing website?

Do you guys get this error message too?

Turns out, our problem is due to Sentry Web Worker having problem accessing our artifact stored inside our main Sentry container.

We got it to work by following jonaskello’s suggestion Improve source scrape debugability · Issue #4168 · getsentry/sentry · GitHub

The solution is to have both the main sentry container and all worker containers map the path /var/lib/sentry/files to the same volume so the files are shared between main and worker containers.

– jonaskello

Prior to this our Sentry server is showing an IOError > [Errno 2] No such file or directory: xxxx.