Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source maps working only with dev build #3073

Closed
6 of 11 tasks
Arcus16 opened this issue May 16, 2023 · 6 comments
Closed
6 of 11 tasks

Source maps working only with dev build #3073

Arcus16 opened this issue May 16, 2023 · 6 comments

Comments

@Arcus16
Copy link

Arcus16 commented May 16, 2023

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 4.14.0

react-native version: 0.70.7

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

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

Source maps working
Source maps not working

Configuration:

(@sentry/react-native)

export const routingInstrumentation = new Sentry.ReactNavigationInstrumentation({});

Sentry.init({
    dsn: Config.SENTRY_DSN,
    environment: Config.APP_ENV,
    tracesSampleRate: 1.0,
    integrations: [
        new Sentry.ReactNativeTracing({
            routingInstrumentation,
        }),
    ],
});

I have following issue:

I followed this guide to upload source maps to sentry. The source maps work when the error is sent from the app in dev mode, but when the error is received from the app built for release, the source maps are not working.

@krystofwoldrich
Copy link
Member

krystofwoldrich commented May 16, 2023

Hi,
thank you for the message and the links,
are the source maps not working for both Android and iOS release builds?

How do you enable source maps in your iOS builds, using EXTRA_PACKAGER_ARGS or SOURCEMAP_FILE?

Hermes source maps guide

I see that you uploaded both Release Bundles and Artifact Bundles, Artifact Bundles are our new way of handling source maps I would recommend keeping that and deleting the Release Bundles. Likely you upgrade sentry-cli while working on the source maps.

@Arcus16
Copy link
Author

Arcus16 commented May 17, 2023

Hi,
Yes, source maps are not working for both platforms, for Android in dev env. working , but here the released version and they do not.

How do you enable source maps in your iOS builds, using EXTRA_PACKAGER_ARGS or SOURCEMAP_FILE?

Looking at the document again, I somehow skipped/forgot about this :( .

@Arcus16
Copy link
Author

Arcus16 commented Jun 2, 2023

Hi,
From the last time, I updated the @sentry/react-native to version 5.5.0 and @sentry/cli to version 2.18.1.

Now, when I send the error from a simulator, the sourcemaps are working, but I see this error in sentry.

Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what's set in your Sentry.init. The value for this event is ...

I am unsure why I get this error because I checked it, and the release variable sent with each event has the same value as release I used to upload source maps. Or am I missing something?

@krystofwoldrich
Copy link
Member

Hi,
the issue is from dev environment. That's symbolicated on the simulator. To verify if the source maps are working can you try to build a release version of your app and send the error?

@Arcus16
Copy link
Author

Arcus16 commented Jun 2, 2023

Hi,
tried it with release version, and it's working 🎉 , but I also this second error not sure if it should work. I will try android

@krystofwoldrich
Copy link
Member

Awesome to hear, the second error is issue tracked here. So I will close this now. In case of any other issues, we can reopen this one or create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants