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

How-To Guide On Uploading dSYM Files Using Expo EAS #136

Open
itajenglish opened this issue Oct 25, 2023 · 7 comments
Open

How-To Guide On Uploading dSYM Files Using Expo EAS #136

itajenglish opened this issue Oct 25, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@itajenglish
Copy link

Summary

Many companies use Expo and Expo EAS to manage the React Native build process. It would be great to get a guide on how to upload dSYM files to NewRelic using Expo EAS.

Desired Behavior

Possible Solution

Additional context

@itajenglish itajenglish added the enhancement New feature or request label Oct 25, 2023
@objectiveSee
Copy link

+1! We also need JS stack traces.

@ndesai-newrelic
Copy link
Contributor

ndesai-newrelic commented Dec 13, 2023

@objectiveSee this is for ios symbolication. which we are supported.

@ndesai-newrelic
Copy link
Contributor

@itajenglish you need to follow this to upload DSYM.
With the 7.4.6 release, the XCFramework no longer includes the dsym-upload-tools. You can find the dsym-upload-tools in the dsym-upload-tools folder of the https://github.com/newrelic/newrelic-ios-agent-spm Swift Package Manager repository. Please copy the dsym-upload-tools directory into your application source code directory by copying the XCFramework into your project or using Cocoapods if you're integrating the New Relic iOS Agent. Use the run script below in your Xcode build phases to perform symbol upload steps during app builds in Xcode.

ARTIFACT_DIR="${BUILD_DIR%Build/*}"
SCRIPT=/usr/bin/find "${SRCROOT}" "${ARTIFACT_DIR}" -type f -name run-symbol-tool | head -n 1
/bin/sh "${SCRIPT}" "APP_TOKEN"

We recommend using the swift package manager for your installation method.

@itajenglish
Copy link
Author

@itajenglish you need to follow this to upload DSYM. With the 7.4.6 release, the XCFramework no longer includes the dsym-upload-tools. You can find the dsym-upload-tools in the dsym-upload-tools folder of the https://github.com/newrelic/newrelic-ios-agent-spm Swift Package Manager repository. Please copy the dsym-upload-tools directory into your application source code directory by copying the XCFramework into your project or using Cocoapods if you're integrating the New Relic iOS Agent. Use the run script below in your Xcode build phases to perform symbol upload steps during app builds in Xcode.

ARTIFACT_DIR="${BUILD_DIR%Build/*}" SCRIPT=/usr/bin/find "${SRCROOT}" "${ARTIFACT_DIR}" -type f -name run-symbol-tool | head -n 1 /bin/sh "${SCRIPT}" "APP_TOKEN" We recommend using the swift package manager for your installation method.

@ndesai-newrelic Thank you for this, however, we don't interact with Xcode when using Expo. Our local builds are handled by the Expo CLI and our production builds are handled by Expo's EAS service. Is it possible to get a solution similar to Sentry?

@jake-carpenter
Copy link

I spent some time trying to figure this out today. It's really disappointing that the NR team doesn't want to provide any avenue to upload these outside of Xcode integration. That simply won't cut it for modern React-Native development. You'd think at minimum we could manually upload our dSYM.

For what it's worth to anyone who finds it useful, you can get the dSYM file from EAS:

  1. Add buildArtifactsPath setting to the iOS section in your build profile:
{
  "build": {
    "production": {
      "ios": {
        "buildArtifactPaths": ["ios/build/*"]
      }
    }
  }
}
  1. Request the artifact via command line
    npx eas-cli build:list --json --non-interactive --platform=ios --limit 1 | jq '.[0].artifacts.buildArtifactsUrl' | xargs wget

  2. Rename the hideous file (optional)
    mv artifacts-*.tar.gz* artifacts.tar.gz

  3. Extract
    mkdir artifacts && tar xzvf artifacts.tar.gz -C artifacts

Your dSYM is now in ./artifacts/ios/build

@itajenglish
Copy link
Author

I spent some time trying to figure this out today. It's really disappointing that the NR team doesn't want to provide any avenue to upload these outside of Xcode integration. That simply won't cut it for modern React-Native development. You'd think at minimum we could manually upload our dSYM.

For what it's worth to anyone who finds it useful, you can get the dSYM file from EAS:

  1. Add buildArtifactsPath setting to the iOS section in your build profile:
{
  "build": {
    "production": {
      "ios": {
        "buildArtifactPaths": ["ios/build/*"]
      }
    }
  }
}
  1. Request the artifact via command line
    npx eas-cli build:list --json --non-interactive --platform=ios --limit 1 | jq '.[0].artifacts.buildArtifactsUrl' | xargs wget
  2. Rename the hideous file (optional)
    mv artifacts-*.tar.gz* artifacts.tar.gz
  3. Extract
    mkdir artifacts && tar xzvf artifacts.tar.gz -C artifacts

Your dSYM is now in ./artifacts/ios/build

Agreed! Thanks for sharing this @jake-carpenter

@ndesai-newrelic
Copy link
Contributor

@jake-carpenter this documentation provides instructions on how to upload dsym files manually, without using Xcode, for symbolicated crash reporting. https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-ios/configuration/upload-dsyms-bitcode-apps/#manual-dsym .

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

No branches or pull requests

4 participants