Repository navigation
Conversation
The "Upload Debug Symbols to Sentry" phase needs Node to locate sentry-xcode-debug-files.sh, but NODE_BINARY is only set by the env files that script loads. When Xcode is launched from the Dock or Finder, `node` is not on the PATH, so the lookup fails before the script runs. Source .xcode.env and .xcode.env.local in the phase first, as the Expo template's bundle phase does. Fixes getsentry#6859
ceydaakin
requested review from
alwx,
antonis and
lucas-zimerman
as code owners
October 9, 2026 07:04
alwx
requested changes
Oct 9, 2026
| fi | ||
| if [[ -f "$PODS_ROOT/../.xcode.env.local" ]]; then | ||
| source "$PODS_ROOT/../.xcode.env.local" | ||
| fi`; |
Contributor
There was a problem hiding this comment.
[[ ]] and source are bash features. The Xcode phase works because /bin/sh on macOS is bash. But our Jest jobs run on ubuntu-latest, where /bin/sh is dash. Could you please update it to POSIX form that works on both shells?
Contributor
There was a problem hiding this comment.
maybe something like that:
const LOAD_XCODE_ENV = `if [ -f "$PODS_ROOT/../.xcode.env" ]; then
. "$PODS_ROOT/../.xcode.env"
fi
if [ -f "$PODS_ROOT/../.xcode.env.local" ]; then
. "$PODS_ROOT/../.xcode.env.local"
fi`;
Contributor
|
Hey @ceydaakin and thanks for your PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
The Expo plugin's "Upload Debug Symbols to Sentry" build phase now sources
.xcode.envand.xcode.env.localbefore it resolves the path ofsentry-xcode-debug-files.sh, the same way the Expo template's "Bundle React Native code and images" phase does.Existing projects pick this up on the next
expo prebuild, because the plugin already rewrites this Sentry-owned phase.💡 Motivation and Context
Fixes #6859.
The phase uses
${NODE_BINARY:-node}to locatesentry-xcode-debug-files.sh, butNODE_BINARYis only set by the env files that the script itself loads. When Xcode is launched from the Dock or Finder,node(nvm, Homebrew) is not on the PATH, so the lookup fails before the script runs and the phase exits 127 (/bin/sh: node: command not found).💚 How did you test it?
/bin/shand launchd's PATH (/usr/bin:/bin:/usr/sbin:/sbin): one withNODE_BINARYin.xcode.env, one with the default.xcode.envplus.xcode.env.local. Both fail onmainand pass with this change.export SENTRY_DISABLE_AUTO_UPLOAD=truedirectly followed by/bin/shwere relaxed, since the env loading now sits between them.yarn jest test/expo-plugininpackages/core: 89 tests pass.oxlintandoxfmt --checkare clean on the touched files.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
${NODE_BINARY:-node}in this phase is unquoted, so a Node path containing spaces still fails. That is unchanged here.