xcodebuild fails with "/node_modules/@sentry/cli/sentry-cli: cannot execute binary file"
See original GitHub issueOS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
Output of node -v && npm -v && npm ls --prod --depth=0
bash-3.2$ node -v && npm -v && npm ls --prod --depth=0
v9.10.0
5.6.0
/Users/distiller
└── (empty)
Config:
Sentry.config('https://...@sentry.io/...', {
logLevel: SentryLog.Error
}).install()
I have following issue:
xcodebuild fails during Bundle React Native code and images
build phase. The build phase has the following content,
export SENTRY_PROPERTIES=sentry.properties
export NODE_BINARY=node
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode \
../node_modules/react-native/scripts/react-native-xcode.sh
The error I get is the following,
[19:25:35]: ▸ export arch=arm64
[19:25:35]: ▸ export variant=normal
[19:25:35]: ▸ /bin/sh -c /Users/distiller/project/fastlane/generated/Build/Intermediates.noindex/ArchiveIntermediates/PoolOfficeManager/IntermediateBuildFilesPath/PoolOfficeManager.build/Release-iphoneos/PoolOfficeManager.build/Script-00DD1BFF1BD5951E006B06BC.sh
[19:25:35]: ▸ /Users/distiller/project/node_modules/@sentry/cli/sentry-cli: /Users/distiller/project/node_modules/@sentry/cli/sentry-cli: cannot execute binary file
[19:25:35]: ▸ Command /bin/sh failed with exit code 126
I am using,
- Fastlane
2.78.0
- CircleCI
2.0
- XCode
9.3
- React Native
0.53.0
- React Native Sentry
0.36.0
Important Notes
- I am running this on CircleCI.
- If I comment out the Sentry part of the
Bundle React Native code and images
phase the build succeeds. - The build succeeds when running locally but fails when run in CircleCI.
Steps to reproduce: (Kind of hard to reproduce with CircleCI being involved however this is the xcodebuild command that fails)
- set -o pipefail && xcodebuild -scheme <scheme name> -project ios/<project name>.xcodeproj -configuration Release -destination ‘generic/platform=iOS’ -archivePath fastlane/generated/POM\ 2018-05-01\ 19.22.13.xcarchive -derivedDataPath ‘fastlane/generated’ clean archive | tee /Users/distiller/project/fastlane/generated/<log file name>.log | xcpretty
Actual result:
- Build fails saying
/Users/distiller/project/node_modules/@sentry/cli/sentry-cli: cannot execute binary file
Expected result:
- Build Succeeds
Please let me know if you need any additional details (React Native + Fastlane + CircleCI + MacOS + Xcode is a lot of moving parts), been trying to fix this for about 7 hours now and any help would be greatly appreciated!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
xcodebuild fails with "/node_modules/@sentry/cli ... - GitHub
Build fails saying /Users/distiller/project/node_modules/@sentry/cli/sentry-cli: cannot execute binary file. Expected result: Build Succeeds.
Read more >Cannot execute binary file on xcode - ios - Stack Overflow
I cannot run build with error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: ...
Read more >How can I resolve the error "cannot execute binary file"?
Usually that error message means Linux doesn't recognize the file as a shell script or as an executable file. Typically the cause is...
Read more ><path to command>: cannot execute binary file - AskF5
In this error message, note the following: <path to command> is the full path of the command on the file system. For example:...
Read more >Have a Question? Ask the Community
I`m trying to instal OPM on RHEL 7, when i try to create CredFile by using the CreateCredFile i get an error "cannot...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hi @amast09 thanks for your help ! i just run
yarn upgrade react-native-sentry
as a build step in my Circleconfig.yml
which seems to fix this problem@jamesmcn1 here is the relevant sections of my Circle configuration,
hopefully it can help you 👍