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

iOS scripts respect cli.executable when custom value given #1912

Open
marandaneto opened this issue Nov 23, 2021 · 5 comments
Open

iOS scripts respect cli.executable when custom value given #1912

marandaneto opened this issue Nov 23, 2021 · 5 comments
Labels
Platform: Cocoa Platform: React-Native Type: Feature Request up-for-grabs ✋ We would really appreciate anyone interested in working on this to submit a PR!
Milestone

Comments

@marandaneto
Copy link
Contributor

marandaneto commented Nov 23, 2021

reason: #1857 (comment)

The fix is probably under https://github.com/getsentry/sentry-wizard/blob/master/lib/Steps/Integrations/ReactNative.ts#L248

@byCedric
Copy link

Sorry to bother you again with this, but is there an ETA on implementing this? Might help giving some Sentry and Expo/EAS users some context 😄

@marandaneto
Copy link
Contributor Author

marandaneto commented Nov 30, 2021

@byCedric no worries, unfortunately, we don't have an ETA since we are still prioritizing all the open issues, closing old ones, etc... hoping to work on that soon tho.
would you like to submit a PR and patch the shell script on sentry-wizard?

pretty much what needs to be done is:

read cli.executable from the exported sentry.properties, and if not found, keep the hardcoded value, ../node_modules/@sentry/cli/bin/sentry-cli

we should do it just before https://github.com/getsentry/sentry-wizard/blob/master/lib/Steps/Integrations/ReactNative.ts#L248 and replace the hardcoded sentry-cli path with the variable that reads from cli.executable or fallback to the hardcoded one.

@marandaneto
Copy link
Contributor Author

ideally the integration could also try to find the correct folder, its done on Android #1917

@marandaneto marandaneto added the up-for-grabs ✋ We would really appreciate anyone interested in working on this to submit a PR! label Jan 25, 2022
@marandaneto marandaneto added this to the 5.0.0 milestone Dec 7, 2022
@krystofwoldrich krystofwoldrich modified the milestones: 5.0.0, 5.1.0 Jan 30, 2023
@ayush-goyal
Copy link

Is there any update on this? It would be really helpful

@krystofwoldrich
Copy link
Member

Hi @ayush-goyal,
we currently don't have any plans for this, but we have a way to specify Sentry CLI executable in React Native iOS builds.

You can use SENTRY_CLI_EXECUTABLE environmental variabled.

export SENTRY_CLI_EXECUTABLE=/path/to/the/sentry/cli/bin

Make sure you are using the latest version of the Sentry Build Phases for this variable to be working.
See the latest config at https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#configure-automatic-source-maps-upload

For the future reference the current latest Bundle React Native build phase should look like this.

set -e

WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
SENTRY_XCODE="../node_modules/@sentry/react-native/scripts/sentry-xcode.sh"
BUNDLE_REACT_NATIVE="/bin/sh $SENTRY_XCODE $REACT_NATIVE_XCODE"

/bin/sh -c "$WITH_ENVIRONMENT '$BUNDLE_REACT_NATIVE'"

And Upload Debug Files to Sentry like this:

/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh

If you are an Expo user make sure you are using @sentry/[email protected] or newer and the SENTRY_CLI_EXECUTABLE will work as well.
https://docs.sentry.io/platforms/react-native/manual-setup/expo/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Cocoa Platform: React-Native Type: Feature Request up-for-grabs ✋ We would really appreciate anyone interested in working on this to submit a PR!
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

7 participants