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

Auto Sourcemap upload script on Xcode fails unless --force_foreground is present #1424

Closed
nicomontanari opened this issue Mar 23, 2021 · 15 comments · Fixed by #2016
Closed

Comments

@nicomontanari
Copy link

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
React Native 2.3.0

Description

At the end of the compilation procedure on Android the source maps are uploaded correctly, but with iOS the files are not uploaded on sentry and no errors are shown

Build Phases

Bundle React Native code and images code

export SENTRY_PROPERTIES=sentry.properties
export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map"
export NODE_BINARY=node
yarn buildTsCode
export ENTRY_FILE="artifacts/index.js"
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh

Upload Debug Symbols to Sentry

export SENTRY_PROPERTIES=sentry.properties
../node_modules/@sentry/cli/bin/sentry-cli upload-dsym

@nicomontanari nicomontanari changed the title Source map of iOS doesn't upload The iOS source map doesn't upload Mar 23, 2021
@jennmueng
Copy link
Member

What does yarn buildTsCode do, I assume it builds ts code into js? Can you pass --verbose to the sentry-cli command, and see what it logs?

../node_modules/@sentry/cli/bin/sentry-cli react-native xcode --verbose ../node_modules/react-native/scripts/react-native-xcode.sh

@nicomontanari
Copy link
Author

nicomontanari commented Mar 25, 2021

Hi @jennmueng, buildTsCode is a custom script that i made to build the typescript code and do other actions.

I tried to put --verbose in the "Bundle React Native code and images code" script and these are the logs:

Schermata 2021-03-25 alle 10 24 46

@emirsavran
Copy link

Hi, probably same issue. I created an issue in sentry-cli repository. getsentry/sentry-cli#932

@jennmueng
Copy link
Member

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

@emirsavran
Copy link

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

Hi, actually --force-foreground flag worked well. Thanks for your help.

@nicomontanari
Copy link
Author

Actually, that log looks familiar to something I've seen before. @nicomontanari

Can you try passing --force_foreground to the cli command?

Also @emirsavran too.

Hi, i'm sorry for my absence. Everything works with --force-foreground. Thank you

@jennmueng jennmueng reopened this Jul 9, 2021
@jennmueng jennmueng changed the title The iOS source map doesn't upload Auto Sourcemap upload script on Xcode fails unless --force_foreground is present Jul 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto
Copy link
Contributor

@jennmueng I see it in our docs https://docs.sentry.io/platforms/react-native/troubleshooting/#ios-build-script-failed but should we rather fix it on CLI or RN SDK?

@jennmueng
Copy link
Member

@marandaneto I think this is a fix that needs to be done on the CLI

@marandaneto
Copy link
Contributor

@jennmueng should we always invoke the CLI with --force-foreground? we can patch the xcode script (via wizard), if the CLI already has such option, why would we need to fix it on the CLI? what was the motivation for doing it in the background actually in the first place? @jan-auer do you have context about that?

@marandaneto
Copy link
Contributor

apparently this was an issue with sentry-cli and it should be solved by using the latest sentry-cli https://github.com/getsentry/sentry-cli/releases/tag/1.71.0

@majirosstefan
Copy link

Using 1.71.1 according to the 'yarn list' output, and the problem still persists.

@marandaneto
Copy link
Contributor

Using 1.71.1 according to the 'yarn list' output, and the problem still persists.

thanks, gonna check with the CLI team getsentry/sentry-cli#932 (comment)

@marandaneto
Copy link
Contributor

@kamilogorek is checking this out.

@kamilogorek
Copy link
Contributor

Should be fixed once #2016 is release.

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

Successfully merging a pull request may close this issue.

7 participants