sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

Add note to docs: Source Maps are not uploaded for dev/debug builds

Open reizhafajrian opened this issue 1 year ago • 3 comments

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

Platform:

  • [x] iOS
  • [ ] Android

SDK:

  • [x] @sentry/react-native (>= 1.0.0)
  • [ ] react-native-sentry (<= 0.43.2)

SDK version: 0.0.0

react-native version: 0.0.0

Are you using Expo?

  • [x] Yes
  • [ ] No

Are you using sentry.io or on-premise?

  • [x] sentry.io (SaaS)
  • [ ] on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(app.json)

"plugins": [
      [
        "@sentry/react-native/expo",
        {
          "url": "https://sentry.io/",
          "project": "example-5",
          "organization": "example"
        }
      ]
    ],

(@sentry/react-native)

Sentry.init({
  dsn: "mydsn",
  tracesSampleRate: 1.0,
});

//app.js code
export default Sentry.wrap(App);

(metro.config.js)

const { getSentryExpoConfig } = require('@sentry/react-native/metro');

const config = getSentryExpoConfig(__dirname);

module.exports = config;

I have the following issue:

[Description]

Steps to reproduce:

  • following setup like sentry docs with expo
  • build the app with eas

Actual result:

image

Expected result:

Source map should be there

reizhafajrian avatar Apr 05 '24 07:04 reizhafajrian

Hi @reizhafajrian, thank you for the message,

when you open the build logs, do you see any upload errors?

For iOS look for Bundle React Native code and images build phase, for Android look for *_SentryUpload_* task.

If there is no information, can you add in the build env SENTRY_CLI_EXTRA_ARGS with value --force-foreground --log-level=debug?

krystofwoldrich avatar Apr 08 '24 14:04 krystofwoldrich

I recently discovered that in Expo 50, source maps are not uploaded when using debug or simulator versions. This detail wasn't immediately clear in the current documentation, and I only realized it after manually checking the repository.

For the benefit of other developers, could the documentation be updated to clearly state that source maps do not get uploaded in debug or simulator modes? Adding a specific note or warning about this in the relevant sections could prevent future confusion and help developers better understand the environment-specific behaviors of Expo.

Thank you for your attention to this matter

reizhafajrian avatar Apr 15 '24 10:04 reizhafajrian

Hi @reizhafajrian, I agree we will add this to the docs.

A bit of context, the source maps in dev builds are not uploaded as Sentry symbolicates the stack trace locally on your computer.

krystofwoldrich avatar Apr 15 '24 14:04 krystofwoldrich