Skip to content

sentry-xcode-debug-files.sh: No such file or directory (due to lack of monorepo awareness) #1021

@shirakaba

Description

@shirakaba

What React Native libraries do you use?

Expo (mobile only), RN New Architecture, Hermes

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

6.16.0 (previously 6.4.0)

Steps to Reproduce

Having set up an Expo SDK 53, React Native 0.79.4 project as an app in a pnpm monorepo with node-linker=hoisted, and having carried out the Sentry Wizard setup, simply try running the iOS app.

pnpm ios

Expected Result

App successfully builds and runs.

Actual Result

The Xcode build fails during the Upload Debug Symbols to Sentry build phase with the following error:

/bin/sh: ../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

The error is because the shell script is hard-coded as:

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

For a monorepo with node-linker=hoisted, that path is wrong. In such a monorepo, the path should rather be like this:

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

But it shouldn't be hard-coded at all. You should use node module resolution to search for @sentry/react-native. I'm surprised monorepo-aware node module resolution was correctly used in Bundle React Native code and images yet not in Upload Debug Symbols to Sentry.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions