Skip to content

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

@garrettg123

Description

@garrettg123

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions