SourceMaps appearing minified on Sentry

I am using Expo and the sentry-expo package. I’ve also set up my post-publish hook to upload sourcemaps and everything seems to be in order.

However, when an error gets reported, everything seems minified/uglified

Making it, obviously, very hard to troubleshoot. How can I remedy this? Thanks in advance!

I’d take this with Expo folks who maintain the sentry-expo package. Pinging @jauer just in case he knows more.

@bill-pairaktaridis Could you share more information on your setup? I can share a couple of points that you can verify, and we can then take it from there:

  • Which version of Sentry are you running on (or is it
  • Are there any processing errors shown on the issue details page? This would indicate that source maps are not set up correctly.
  • Are releases set up correctly? The event should contain a release that matches the one where source maps have been uploaded.
  • The stack trace should also show file paths for the minified javascript files. Do those paths match the paths of the uploaded files in the Release? Often times it is hard to get the prefixes right.

Hi and thanks for replying!

  • I’m using “sentry-expo”: “1.13.0”
  • The only error is “trimHeadFrames : Discarded unknown attribute”
  • The release may actually not be set correctly as I’m seeing the release I’ve set up with Sentry.config on the issue page but the releases all have automatically generated names
  • There is no stack trace, as far as I can tell

The release is key. When you said that you’re uploading sourcemaps to Sentry, this always happens in the context of a release. That means, that the sourcemaps are uploaded as “artifacts”.

Releases are typically named after a commit hash or app version. In your case, I guess it’s the commit hash.

Additionally, the release name (e.g. the commit hash) has to be sent along with all events that the SDK submits. For that reason, the SDK has to be configured with the release. Now, I haven’t looked at sentry-expo, but I imagine that it would work something like this:

  dsn: 'your dsn',
  release: 'release hash here',

To your last point: Isn’t the screen shot that you posted in the original post the stack trace? If there is no stack trace, then we can’t resolve anything. We do not parse stringified messages, so you have to capture an actual error.

If this is on, can you link me to the issue so I can take a look, please?

Yes, I guess the breadcrumb is technically the stack trace. So how do I go about matching the two?

sentry-expo creates a release based on the release in my app.json and then a random hash, like so 1.1.0-r.mpaek79r1n whereas the release in the Sentry.config initialization has to be set manually.

This is an issue, for example.

Update: It turns out that simply removing the release property from the initialization fixes this. Thanks for your time!