Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds failing on CircleCI because of sentry-cli (node_modules/@sentry/cli/sentry-cli: cannot execute binary file) #1814

Closed
thomsocialbrothers opened this issue Oct 6, 2021 · 9 comments

Comments

@thomsocialbrothers
Copy link

Environment

How do you use Sentry?
Sentry SaaS

Which SDK and version?
@sentry/react-native@3.1.1

Steps to Reproduce

  • Add @sentry/react-native@3.1.1 to your React Native project
  • Configure your project using npx @sentry/wizard -i reactNative -p ios android
  • Try to build your app on CircleCI

Expected Result

I expect the app to be building normally, just as it would do locally.

Actual Result

Getting the following error:

▸ Running script 'Bundle React Native code and images'
** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/distiller/Library/Developer/Xcode/DerivedData/asr********-alszcgapqfuvrgddpvgnyjssmgtd/Build/Intermediates.noindex/ArchiveIntermediates/********/IntermediateBuildFilesPath/********.build/Release-iphoneos/asr********.build/Script-00DD1BFF1BD5951E006B06BC.sh
(1 failure)
[07:34:03]: Exit status: 65
[07:34:03]: 
[07:34:03]: Maybe the error shown is caused by using the wrong version of Xcode
[07:34:03]: Found multiple versions of Xcode in '/Applications/'
[07:34:03]: Make sure you selected the right version for your project
[07:34:03]: This build process was executed using '/Applications/Xcode-12.5.1.app'
[07:34:03]: If you want to update your Xcode path, either
[07:34:03]: 
[07:34:03]: - Specify the Xcode version in your Fastfile
[07:34:03]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[07:34:03]: 
[07:34:03]: - Specify an absolute path to your Xcode installation in your Fastfile
[07:34:03]: ▸ xcode_select "/Applications/Xcode8.app"
[07:34:03]: 
[07:34:03]: - Manually update the path using
[07:34:03]: ▸ sudo xcode-select -s /Applications/Xcode.app
[07:34:03]: 

+---------------+--------------------------------+
|               Build environment                |
+---------------+--------------------------------+
| xcode_path    | /Applications/Xcode-12.5.1.app |
| gym_version   | 2.194.0                        |
| export_method | ad-hoc                         |
| sdk           | iPhoneOS14.5.sdk               |
+---------------+--------------------------------+

[07:34:03]: ▸     export arch\=undefined_arch
[07:34:03]: ▸     export variant\=normal
[07:34:03]: ▸     /bin/sh -c /Users/distiller/Library/Developer/Xcode/DerivedData/asr********-alszcgapqfuvrgddpvgnyjssmgtd/Build/Intermediates.noindex/ArchiveIntermediates/asr********/IntermediateBuildFilesPath/********.build/Release-iphoneos/********.build/Script-00DD1BFF1BD5951E006B06BC.sh
[07:34:03]: ▸ /Users/distiller/project/node_modules/@sentry/cli/sentry-cli: /Users/distiller/project/node_modules/@sentry/cli/sentry-cli: cannot execute binary file
[07:34:03]: ▸ Command PhaseScriptExecution failed with a nonzero exit code

Extra information

The builds succeeds whenever i remove the build phase "Uploading debug symbols to Sentry" and remove the following lines that were added to my "Bundle React Native code and images:" build phase:

 SENTRY_PROPERTIES=sentry.properties
export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"
export NODE_BINARY=node

../node_modules/@sentry/cli/bin/sentry-cli react-native xcode 

Tried solutions

  • Tried applying chmod +x on @sentry/cli/sentry-cli and @sentry/cli/bin/sentry-cli
  • Tried solution in this comment
  • Tried solution in this comment
@jennmueng
Copy link
Member

cc @kamilogorek

@jennmueng
Copy link
Member

FYI This is the source code build script, in the meantime you're free to skip running our build script to get your CI working for now.

@kamilogorek
Copy link
Contributor

I'm gathering all related issues to a single one so its easier to keep track of the progress. Please use getsentry/sentry-cli#1015 for further discussions.

@defi-bear
Copy link

image
It's the same for me. It stopped building after the sentry install.

@raymondjacobson
Copy link

@Shing-Ho was this ever resolved for you?

@defi-bear
Copy link

I think I solved it.

@BilalSattar99
Copy link

@Shing-Ho how you solved it

@matt-dalton
Copy link

Did you manage to work this out @Shing-Ho @BilalSattar99 ?

@BilalSattar99
Copy link

@matt-dalton Yes by adding Auth-Token for Sentry CLI inside the pipeline

@getsentry getsentry locked and limited conversation to collaborators Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants