Closed taylorkline closed 1 week ago
Hi,
thank you for the message, you can replace the Upload Debug Symbols to Sentry
shell script with the following code.
/bin/sh ../../scripts/sentry-xcode-debug-files.sh
Let us know if this solution helped you, if not feel free to comment with more details and we can reopen the issue.
Hi, thank you for the message, you can replace the
Upload Debug Symbols to Sentry
shell script with the following code./bin/sh ../../scripts/sentry-xcode-debug-files.sh
Let us know if this solution helped you, if not feel free to comment with more details and we can reopen the issue.
@krystofwoldrich no dice, after changing the command to /bin/sh ../../../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh
+ '[' -z '' ']'
+ WITH_ENVIRONMENT=../node_modules/react-native/scripts/xcode/with-environment.sh
+ '[' -f ../node_modules/react-native/scripts/xcode/with-environment.sh ']'
+ set -e
+ LOCAL_NODE_BINARY=node
+ '[' -z '' ']'
+ export SENTRY_PROPERTIES=sentry.properties
+ SENTRY_PROPERTIES=sentry.properties
+ '[' -z '' ']'
++ node --print 'require('\''path'\'').dirname(require.resolve('\''@sentry/cli/package.json'\''))'
../../../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh: line 22: node: command not found
+ SENTRY_CLI_PACKAGE_PATH=
Command PhaseScriptExecution failed with a nonzero exit code
The "Bundle React Code and Images" step still has no problem.
Node found at: /Users/taylor/node-18
+ LOCAL_NODE_BINARY=/Users/taylor/node-18
+ '[' -z '' ']'
@krystofwoldrich following the way "Bundle React Code and Images" works, I made "Upload Debug Symbols to Sentry" work as follows:
WITH_ENVIRONMENT="../../../node_modules/react-native/scripts/xcode/with-environment.sh"
/bin/sh -c "$WITH_ENVIRONMENT ../../../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh"
This worked fine. What do you think?
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)5.22.0
SDK version:
react-native
version: 0.73.8Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
N/A
Configuration:
Bundle React Native Code and Images:
Upload debug symbols to Sentry:
I have the following issue:
The build stage "Upload Debug Symbols to Sentry" fails with
Steps to reproduce:
Install node with something like
fnm
and configure correctly.Observe that
/usr/bin/env node
displays "Welcome to Node.js v...."Observe that, because of
.xcode.env.local
, the step "Bundle React Native code and images" succeeds fine and outputs "Node found at:..."Observe that, because of the shebang in
@sentry/cli/bin/sentry-cli
, running the script immediately errors with "env: node: No such file or directory".Observe that when
node
is symlinked in/usr/local/bin/node
, the step succeeds fine.Actual result:
"Upload Debug Symbols to Sentry" should find and use node just like "Bundle React Native code and images"
Expected result:
"Upload Debug Symbols to Sentry" requires
node
to be in the defaultPATH
because of the#!/usr/bin/env node
shebang