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

iOS Sourcemap Not Working using sentry-cli or sentry-fastlane #1024

Closed
5 of 11 tasks
garrettg123 opened this issue Aug 14, 2020 · 3 comments
Closed
5 of 11 tasks

iOS Sourcemap Not Working using sentry-cli or sentry-fastlane #1024

garrettg123 opened this issue Aug 14, 2020 · 3 comments

Comments

@garrettg123
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.3.7

react-native version: 0.61.4

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/think-smart-journal/issues/1839835685/?project=5178279&statsPeriod=14d

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'HIDDEN,
  enableAutoSessionTracking: true,
})
const sentryReleaseName = `${DeviceInfo.getBundleId()}-${DeviceInfo.getVersion()}`
const sentryDistName = DeviceInfo.getBuildNumber()
Sentry.setRelease(sentryReleaseName)
Sentry.setDist(sentryDistName)

I have following issue:

The sourcemap and source are uploaded via sentry-cli and are listed under the artifacts of the release, but the issue still says "app:///main.jsbundle in onPress at line 2019:2751"

Steps to reproduce:

  • Bundle: react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/ios.main.bundle --sourcemap-output ios/ios.main.bundle.map
  • Upload: cd ios && MARKETING_VERSION=$(xcodebuild -showBuildSettings | grep MARKETING_VERSION | tr -d 'MARKETING_VERSION =') && BUILD_VERSION=$(xcodebuild -showBuildSettings | grep CURRENT_PROJECT_VERSION | tr -d 'CURRENT_PROJECT_VERSION =') && env SENTRY_ORG=think-smart-journal SENTRY_LOG_LEVEL=info SENTRY_PROJECT=react-native yarn sentry-cli releases files com.thinksmartjournal-$MARKETING_VERSION upload-sourcemaps --dist $BUILD_VERSION --bundle ios/ios.main.bundle --bundle-sourcemap ios/ios.main.bundle.map
  • Sentry.captureException('Test error!')

I have also tried uploading via fastlane:

    sentry_upload_sourcemap(
      version: app_identifier + "-" + get_version_number(xcodeproj: xcodeproj),
      dist: get_build_number(xcodeproj: xcodeproj),
      app_identifier: app_identifier,
      sourcemap: "ios.main.bundle.map",
      rewrite: true
    )

Actual result:

app:///main.jsbundle in onPress at line 2019:2751

Screen Shot 2020-08-13 at 11 49 17 PM

Screen Shot 2020-08-13 at 11 50 10 PM

Screen Shot 2020-08-13 at 11 50 42 PM

Expected result:

Source map to .ts file.

@jennmueng
Copy link
Member

jennmueng commented Aug 14, 2020

@garrett-gottlieb You should have a dialog at the top of your error on the Sentry dashboard that says something along the lines of "Source Map not found" correct? So as I see it currently your bundle and source map is called ios.main.bundle and ios.main.bundle.map and the app is looking for a app:///main.jsbundle. The names have to exactly match, try uploading them again but name them main.jsbundle and main.jsbundle.map and they should work.

Also as a note just in case, the release and dist have to also exactly match on the error and the source map.

Let me know if this works for you!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto
Copy link
Contributor

@garrett-gottlieb any update on this? release and dist should match, also the file name as mentioned

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

No branches or pull requests

3 participants