You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RN 0.74.6 in a mono repo w/ @sentry/react-native 5.35.0 & Volta managing Node versions (configured properly in .xcode.env)
Steps to Reproduce
Updated app from RN SDK 5.22.2 to 5.35.0 (or used the latest wizard to integrate the RN SDK into an app in a mono repo with node-modules/react-native hoisted above the app directory)
Run build in Xcode
Expected Result
Build works
Actual Result
"Bundle React Native code and images" build phase correctly obeys the .xcode.env and find Node via Volta.
"Upload Debug Symbols to Sentry" build phase fails, stating it can't find Node (it hasn't obeyed .xcode.env).
PR #329 added support for WITH_ENVIRONMENT in the Sentry scripts to work better in mono repos. It looks like PR #499 broke this when the scripts started being bundled with the RN SDK.
I've patched this locally but I don't have time to raise PRs for the Wizard & Docs right now, sorry: 🙏
What I've done for now is update the "Upload Debug Symbols to Sentry" phase to the following:
set -e
export WITH_ENVIRONMENT="$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
/bin/sh ../../../../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh
An inconsistency I noticed; that the "Bundle React Native code and images" script calls with-environment.sh directly before the RN/Sentry script. The way sentry-xcode-debug-files.sh is written, it expects to source the file itself.
Another inconsistency I noticed, but this may be correct, the Bundle phase has input files .xcode.env and .xcode.env.local as Input Files in the Xcode UI but the Upload debug symbols phase doesn't.
The text was updated successfully, but these errors were encountered:
Environment
RN 0.74.6 in a mono repo w/ @sentry/react-native 5.35.0 & Volta managing Node versions (configured properly in
.xcode.env
)Steps to Reproduce
node-modules/react-native
hoisted above the app directory)Expected Result
Build works
Actual Result
"Bundle React Native code and images" build phase correctly obeys the
.xcode.env
and find Node via Volta."Upload Debug Symbols to Sentry" build phase fails, stating it can't find Node (it hasn't obeyed
.xcode.env
).PR #329 added support for WITH_ENVIRONMENT in the Sentry scripts to work better in mono repos. It looks like PR #499 broke this when the scripts started being bundled with the RN SDK.
I've patched this locally but I don't have time to raise PRs for the Wizard & Docs right now, sorry: 🙏
sentry-wizard/src/react-native/xcode.ts
Line 168 in dcfc7be
$REACT_NATIVE_PATH
to make it more mono-repo friendly but I think will still fail due to the lack of sourcingWITH_ENVIRONMENT
.What I've done for now is update the "Upload Debug Symbols to Sentry" phase to the following:
An inconsistency I noticed; that the "Bundle React Native code and images" script calls
with-environment.sh
directly before the RN/Sentry script. The waysentry-xcode-debug-files.sh
is written, it expects to source the file itself.Another inconsistency I noticed, but this may be correct, the Bundle phase has input files
.xcode.env
and.xcode.env.local
as Input Files in the Xcode UI but the Upload debug symbols phase doesn't.The text was updated successfully, but these errors were encountered: