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

Xcode Build Phase not working #3860

Closed
trevorturk opened this issue Apr 16, 2024 · 5 comments · Fixed by getsentry/sentry-docs#9723
Closed

Xcode Build Phase not working #3860

trevorturk opened this issue Apr 16, 2024 · 5 comments · Fixed by getsentry/sentry-docs#9723

Comments

@trevorturk
Copy link

Platform

iOS

Environment

Develop

Installed

Swift Package Manager

Version

8.24.0

Did it work on previous versions?

No response

Steps to Reproduce

Follow instructions in https://docs.sentry.io/platforms/apple/dsym/#xcode-build-phase and test if you see them uploaded here: https://ORG.sentry.io/settings/projects/PROJECT/debug-symbols/

Expected Result

Seeing debug symbols have been uploaded

Actual Result

Shell script is run for a 0.1 seconds then continues in background, but output file is empty. The same script runs successfully if run manually, but perhaps something is going wrong as it's being backgrounded?

Screenshot 2024-04-16 at 4 17 16 PM

Are you willing to submit a PR?

No response

@trevorturk
Copy link
Author

I was able to sort this out, but I'll leave the issue open in case it's helpful to consider documentation updates, perhaps?

All seems well now, thank you!

@brustolin
Copy link
Contributor

Hello @trevorturk, thanks for the help.

ENABLE_USER_SCRIPT_SANDBOXING is really required, I will update the doc.

But --force-foreground was not required in all my tests. Can you confirm this?

@trevorturk
Copy link
Author

trevorturk commented Apr 17, 2024

Thanks for the quick reply!

FWIW I thought I'd mention that I also found the Info.plist comment and link a bit confusing, and the link takes you to a Medium article that's pay-to-read, which is annoying.

For the issue at hand, though, I ended up with the following script:

export SENTRY_ORG=example
export SENTRY_PROJECT=example
sentry-cli debug-files upload --force-foreground --wait --include-sources "$DWARF_DSYM_FOLDER_PATH"

...and the following config:

Screenshot 2024-04-17 at 9 39 51 AM

I confirmed --force-foreground isn't required, so I think any further changes here are optional here, but I would suggest considering linking to the cli config docs and maybe even calling out --force-foreground and --wait as reasonable things to start with, just as you recommend configuring with options.debug to start when using the SDK in your app.

It seems to me that backgrounding essentially hides errors, and if you're only running debug-files upload when Archiving to submit to the App Store etc, then you'd want to know if something went wrong here. So, even beyond starting with those flags to ensure everything is working, I don't think it's a bad idea to keep them on?

No worries either way, and apologies for the noise (this was mostly me bumbling around) but I found it a bit hard to set things up and I think some tweaks to the docs would go a long way to help future users.

Thanks!

@brustolin
Copy link
Contributor

Thank you very much for the update. I like your suggestions, I will amend the docs with it.

@armcknight
Copy link
Member

Thanks for the feedback @trevorturk, this part especially is exactly the feedback I have provided in the past about this tool:

It seems to me that backgrounding essentially hides errors, and if you're only running debug-files upload when Archiving to submit to the App Store etc, then you'd want to know if something went wrong here. So, even beyond starting with those flags to ensure everything is working, I don't think it's a bad idea to keep them on?

I've alluded to this in some issues I raised in the past, but I think that we should explicitly demonstrate using that in our docs, at least for a release config. I opened an issue here: getsentry/sentry-docs#9748

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

Successfully merging a pull request may close this issue.

3 participants