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

Sourcemaps are not resolved in the errors #1169

Closed
6 of 11 tasks
varungupta85 opened this issue Nov 3, 2020 · 5 comments
Closed
6 of 11 tasks

Sourcemaps are not resolved in the errors #1169

varungupta85 opened this issue Nov 3, 2020 · 5 comments

Comments

@varungupta85
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 1.9.0

react-native version: 0.62.2

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:

https://sentry.io/organizations/acintyo/issues/2001332228/?project=98211&query=firstRelease%3A%223.9.1+%284%29%22

Configuration:

(@sentry/react-native)

  Sentry.init({
    dsn:
      'https://abc:[email protected]/98211'
  })

  Sentry.setTags({
    os: DeviceInfo.getSystemName(),
    osVersion: DeviceInfo.getSystemVersion(),
    locale: I18n.currentLocale(),
    device:
      store.getState().userInfo.deviceManufacturer + '-' + DeviceInfo.getModel()
  })

  // const bundleId =
  //   Platform.OS === 'android' ? 'com.galarmapp' : 'com.acintyo.galarm'
  // const release = bundleId + '-' + GlobalConfig.release
  const release = `${GlobalConfig.release} (${DeviceInfo.getBuildNumber()})`
  console.tron.log('Current release', release)
  Sentry.setRelease(release)
  Sentry.setDist(DeviceInfo.getBuildNumber())

I have following issue:

The source maps are no longer resolved in the errors. They used to work fine. For example, check the following error: https://sentry.io/organizations/acintyo/issues/2001743680/?project=98211&query=firstRelease%3Acom.galarmapp-3.4.0. The source maps are resolved fine in this one but they are no longer resolved in my recent releases.

I used to set the release as <bundle-id>-<release-number> but then I saw that in the recent releases, the source maps were tagged with release <release-number> (<distribution-number>) on the Sentry console. So, I changed the call to Sentry.setRelease accordingly but that didn't help either.

Steps to reproduce:

  1. Log an error on Sentry
  2. Check that the sourcemaps are not resolved the errors are shown in the bundled js file without any reference to the actual code

Actual result:

Actual place of error in the code not seen

Expected result:

Actual place of error in the code should be seen

@jennmueng
Copy link
Member

Hi @varungupta85 does an error show above the event on the dashboard saying "Source Maps Not Found"? Can you also pass the event json? Thanks!

@varungupta85
Copy link
Author

hi @jennmueng, yes there is an error on the console saying "Source Maps Not Found". For e.g., check this event: https://sentry.io/organizations/acintyo/issues/2013423438/?project=98211&query=is%3Aunresolved+release%3Acom.galarmapp-3.10.0&statsPeriod=14d.

What do you mean by the event json? Please let me know where I can find it and I will share that information with you.

@varungupta85
Copy link
Author

varungupta85 commented Nov 10, 2020

I see the following in the gradle output

> Task :app:bundleReleaseJsAndAssets_SentryUpload_7340769
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
Uploading sourcemaps for release [email protected]+7340769 distribution 7340769
> Bundled 2 files for upload
> Uploaded release files to Sentry
> File upload complete

Does it mean that I need to set the RELEASE to [email protected]+7340769 while configuring Sentry in the app

Sentry.init({
    dsn:
      'https://abc:[email protected]/98211',
    release: RELEASE,
    dist: DeviceInfo.getBuildNumber()
  })

@jennmueng
Copy link
Member

@varungupta85 You can find the event json by clicking on "JSON" here:
Screen Shot 2020-11-10 at 8 57 06 PM
But yes, if you have the error then it means that the source maps aren't getting correctly mapped. You need to make sure the release and dist set on the source maps exactly matches the values on the errors.

@varungupta85
Copy link
Author

@jennmueng Thanks for your response. Setting the release to the updated value helped.

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

No branches or pull requests

2 participants