sentry-react-native: No such file or directory (os error 2) for sentry-cli on step bundle RN code and images
OS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
Output of node -v && npm -v && npm ls --prod --depth=0
v10.11.0
6.4.1
app@1.1.1 /Users/tt/dev/app
├── @expo/status-bar-height@0.0.1
├── aws-amplify@1.1.3
├── aws-amplify-react-native@1.0.8
├── aws-sdk@2.322.0
├── fuse.js@3.2.1
├── react@16.5.0
├── react-native@0.57.1
├── react-native-animatable@1.3.0
├── react-native-fs@2.11.16
├── react-native-image-picker@0.26.10
├── react-native-image-resizer@1.0.0
├── react-native-intercom@10.2.0
├── react-native-iphone-x-helper@1.1.0
├── react-native-keyboard-aware-scroll-view@0.6.0
├── react-native-linear-gradient@2.4.2
├── react-native-material-textfield@0.12.0
├── react-native-modal@6.5.0
├── react-native-modest-checkbox@2.0.1
├── react-native-openanything@0.0.3
├── react-native-sentry@0.39.0
├── react-native-snap-carousel@3.7.4
├── react-native-spinkit@1.1.1
├── react-navigation@2.17.0
├── styled-components@3.4.9
├── tipsi-stripe@5.6.0
└── uuid@3.3.2
Xcode 9.4.1
Config:
Sentry.config('https://...@sentry.io/...', {
....
}).install()
I have following issue:
Archive or build from Xcode fails on step "Run custom shell script ‘Bundle React Native code and images’ with error: No such file or directory (os error 2)
Run or ‘react-native run-ios’ works.
Config in this step:
export NODE_BINARY=node
export SENTRY_PROPERTIES=sentry.properties
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode \
../node_modules/react-native/scripts/react-native-xcode.sh
Everything works if I remove the sentry-cli part.
export NODE_BINARY=node
export SENTRY_PROPERTIES=sentry.properties
../node_modules/react-native/scripts/react-native-xcode.sh
Tried to install node_modules with both npm and yarn.
Recently updated React Native from 0.54.0 to 0.57.1.
Steps to reproduce:
- Install latest react-native-sentry and link via react-native link
- Install sentry-cli via brew
Actual result:
- Build failed,
No such file or directory (os error 2)
when trying to run sentry-cli script.
Expected result:
- Build to succeed with sentry-cli.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 10
- Comments: 15 (2 by maintainers)
Commits related to this issue
- Quote "$NODE_BINARY" in react-native-xcode.sh (#21383) Summary: Fix build errors when path to $NODE_BINARY contains spaces: error: Can't find '/Path/With Spaces/To/node' binary to build React Native... — committed to facebook/react-native by sundbry 6 years ago
- Quote "$NODE_BINARY" in react-native-xcode.sh (#21383) Summary: Fix build errors when path to $NODE_BINARY contains spaces: error: Can't find '/Path/With Spaces/To/node' binary to build React Native... — committed to facebook/react-native by sundbry 6 years ago
- Quote "$NODE_BINARY" in react-native-xcode.sh (#21383) Summary: Fix build errors when path to $NODE_BINARY contains spaces: error: Can't find '/Path/With Spaces/To/node' binary to build React Native... — committed to microsoft/react-native-macos by sundbry 6 years ago
Currently having the same problem with react-native 0.60.3 and Android build. Funnily enough, the problem does not occur when I have Hermes enabled.
Side note, sourcemaps not working with Hermes enabled.
I’m seeing the same issue, using version 1.0.6, but only when building a new version of the app under CircleCI. It does not happen on my local machine.
Here’s the error I’m getting:
EDIT
The issue had nothing to do with Sentry but with Gradle failing to actually output the files expected by Gradle. This solution is what fixed for me: https://stackoverflow.com/a/56027775
I’m seeing this on Android only as well, React native 0.59.10
@cayodonatti That’s ☝️ a work-around - I don’t think the solution is to manually upload sourcemaps with the sentry-cli, this should work out of the box by the
react-native-sentry
package. (I’m not referring to Hermes)I am closing all old issues, please if this is still a problem feel free to revive it. Also, consider moving to our new SDK
@sentry/react-native
if it still happens there please open a new issue.