-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Cannot upload Debug Symbol using Xcode Build phase #1954
Comments
Hi @williamsantoso93, unfortunately, I will require more information about your setup in order to be able to understand what is going wrong and help you fix the problem. At a minimum, I will need the logs from It would also be extremely helpful if you can share any of the following:
|
Hi @szokeasaurusrex, this is Xcode build logs : Build Log
It said that sentry-cli not installed, but I have installed using My Project is not open source, but I have created brand new project, add sentry using step to reproduce above and it still happen. |
@williamsantoso93 would you be able to share the build Run Script you are using to run the Sentry CLI? |
Hi @szokeasaurusrex, this is the build Run Script # This script is responsable to upload debug symbols and source context for Sentry.
if which sentry-cli >/dev/null; then
export SENTRY_ORG=test-6aq
export SENTRY_PROJECT=apple-ios
ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
else
echo "warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases"
fi I also add these following lines to the Input Files section
|
@williamsantoso93 I think your problem might be that you need to install the Sentry CLI within the build script (at the beginning, before calling the CLI). Xcode build scripts run in a sandbox, so it is possible that the build script cannot access your local installation on Sentry CLI Please let me know if that change fixes your problem; if it does, I will update the relevant docs page here: https://docs.sentry.io/platforms/apple/guides/ios/sourcecontext/#3-xcode-build-phase |
@szokeasaurusrex I have added curl -sL https://sentry.io/get-cli/ | sh
# This script is responsable to upload debug symbols and source context for Sentry.
if which sentry-cli >/dev/null; then
export SENTRY_ORG=test-6aq
export SENTRY_PROJECT=apple-ios
ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
else
echo "warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases"
fi But it still doesn't upload the debug symbol files Build Log
|
Hey, @szokeasaurusrex is currently out of office, he'll take a look next week. |
@williamsantoso93 I am unsure what the problem is based on the logs you have provided; everything appears to be normal. Could you try running the build again, this time setting the log level to |
@szokeasaurusrex , I have added log level to debug in my script if which sentry-cli >/dev/null; then
export SENTRY_ORG=test-6aq
export SENTRY_PROJECT=apple-ios
export SENTRY_LOG_LEVEL=debug
ERROR=$(sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
else
echo "warning: sentry-cli not installed, install using 'brew install getsentry/tools/sentry-cli'"
fi |
@williamsantoso93 thank you for this information. It looks like the reason for the shortened logs is that the uploading process, by default, occurs in the background when running in Xcode. You should be able to get the full debug logs by modifying your run script to the following: if which sentry-cli >/dev/null; then
export SENTRY_ORG=test-6aq
export SENTRY_PROJECT=apple-ios
sentry-cli debug-files upload --include-sources "$DWARF_DSYM_FOLDER_PATH" --log-level=debug --force-foreground
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
else
echo "warning: sentry-cli not installed, install using 'brew install getsentry/tools/sentry-cli'"
fi Please try again with the modified run script I suggested above and provide the logs you obtain. |
@szokeasaurusrex Theses are the updated logs
|
@williamsantoso93 Thank you for the logs! It appears, based on the output, that the Sentry CLI is attempting to access files that it does not have permissions to access. Perhaps, you might be able to fix the problem by adding the path where your dSYMs are stored to the Xcode run script's input file list, similar to how you added the |
@szokeasaurusrex I had added the dSYMs path into input files but I still had the same logs |
@williamsantoso93 Could you try again, but this time add the entire If you still observe the error after trying the above, would you able to post a minimal reproduction (in the form of an Xcode project where you observe the error) to GitHub, and share the link with me? I am having trouble creating a similar setup to yours where I observe this error, since I have only limited experience working with Xcode. |
@szokeasaurusrex I have added hard coded path of |
Thank you @williamsantoso93, I was able to reproduce the error with the repo you provided. I will now try to determine why the error is occurring |
@williamsantoso93, until we have a more permanent fix, I found that you can work around this issue by going to "Build Settings" and setting the "User Script Sandboxing" option to "No." |
@SpaceGrey I will need more information on what you are referring to in order to help you with your problem.
What message are you talking about? What crash are you referring to?
What exactly is not working?
What do you mean by adding Sentry to your project? Did you add the Sentry CLI to your build phase? Did you instrument your application with the Sentry SDK? These are different steps you need to take to get errors sent to Sentry properly. Please consider opening a separate issue, where you fully describe what your problem is and how I can reproduce it. I would be happy to help you, but I can only help if I have enough information about your setup. You can also read through our docs if you have more general questions. |
|
Environment
OS: macOS 14.1.2
sentry-cli: 2.28.6
Xcode: 15.2
Steps to Reproduce
brew install getsentry/tools/sentry-wizard && sentry-wizard -i ios
and followed the prompt.sentryclirc
from This InstructionExpected Result
Debug symbol successfully uploaded to sentry Project
Actual Result
Symbols aren't uploaded.
Logs
Unfortunately adding --log-level or exporting the env. variable do not produce any output.
The text was updated successfully, but these errors were encountered: