Cannot upload debug files to Sentry

110 views Asked by At

So, we are currently trying to upload debug files to Sentry using GitHub Actions after a xcodebuild test command:

set -o pipefail && env NSUnbufferedIO=YES xcodebuild test -scheme Myscheme -workspace myworkspace.xcworkspace -destination 'platform=iOS Simulator,OS=17.0.1,name=iPhone 15 Pro' -enableCodeCoverage YES -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO | xcpretty

For this, we use the following sentry cli command:

sentry-cli debug-files upload --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \
--include-sources \   
--org myorg \   
--project myproject \   
$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME 

But this command gives us an Permission denied (os error 13). Trying to change permissions in directory doesn't worked either.

And we can´t upload the debug files in the build phases because we can´t expose our Sentry token.

Some extra information: our workflow in GitHub Actions is running on macos-13.

Any ideas that could help me? Thanks!

1

There are 1 answers

1
Philipp Hofmann On

Your dSYMs should be in the DerivedData folder on GH actions. Try running

sentry-cli debug-files upload --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \
--include-sources \   
--org myorg \   
--project myproject \   
DerivedData/

The DWARF_DSYM_FOLDER_PATH and DWARF_DSYM_FILE_NAME are specific to Xcode. I wouldn't expect them to work in GH Actions. If DerivedData/ doesn't work, you can get their values by using the -showBuildSettings xcodebuild flag.

You can also specify a custom derived data location by using the -derivedDataPath option of xcodebuild.