The following build commands failed: PhaseScriptExecution - ios

The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/Developer/Library/Developer/Xcode/DerivedData/newtest-
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/Developer/Library/Developer/Xcode/DerivedData/newtest-agxjpntdwitxtlcyhpzcympsamhl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)

Related

How can i solve react native PhaseScriptExecution error

Currently, I'm trying to run the iOS simulator with React Native, but the following error continues to occur.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ***.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ***.xcworkspace -configuration DebugDev -scheme ***Dev -destination id=***
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
...
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/***/Library/Developer/Xcode/DerivedData/***-anoalvrwljcacmebrbezdhvomyhd/Build/Intermediates.noindex/Pods.build/DebugDev-iphonesimulator/AirBridge.build/Script-46EB2E00015FD0.sh (in target 'AirBridge' from project 'Pods')
(1 failure)
I think (in target 'AirBridge' from project 'Pods') is the main cause of the error, so how can I solve this?

##[error]Error: /usr/bin/xcodebuild failed with return code: 65 while creating react native ios pipeline

These are the errors I'm getting in xcode build when I try to create CI pipeline for IOS react native:
/Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h:1:9:
'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
error: failed to emit precompiled header
'/Users/runner/Library/Developer/Xcode/DerivedData/CashfreePgApi-cxepqieabxscabamwybllnvrmoxw/Build/Intermediates.noindex/PrecompiledHeaders/CashfreePgApi-Bridging-Header-swift_QBU1IX81MTNU-clang_38LLOP6JLEB2G.pch'
for bridging header
/Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h
error: generate-pch command failed with exit code 1 (use -v to see
invocation)
error: generate-pch command failed with exit code 1 (use -v to see
invocation)
5./Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h:1:9: 'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
error: failed to emit precompiled header
'/Users/runner/Library/Developer/Xcode/DerivedData/CashfreePgApi-cxepqieabxscabamwybllnvrmoxw/Build/Intermediates.noindex/PrecompiledHeaders/CashfreePgApi-Bridging-Header-swift_2NTBLPEWKMQVG-clang_33EQLJXKHECM6.pch'
for bridging header
/Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h
The following build commands failed:
PrecompileSwiftBridgingHeader normal armv7 (in target 'CashfreePgApi' from project 'CashfreePgApi')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'CashfreePgApi' from project 'CashfreePgApi')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'CashfreePgApi' from project 'CashfreePgApi')
PrecompileSwiftBridgingHeader normal arm64 (in target 'CashfreePgApi' from project 'CashfreePgApi') (4 failures)

I am compiling my react native project for ios, i ran into a couple of issues after adding react-native-maps. i did succeed to fix but ended up with:

** BUILD FAILED **
The following build commands failed:
SwiftEmitModule normal x86_64 Emitting\ module\ for\ ReactNativeElement (in target 'ReactNativeElement' from project 'Pods')
(1 failure)

Error: /usr/bin/xcodebuild failed with return code: 65, trying to do CI/CD on AppCenter

I'm trying to do a CI/CD for my project on App Center, but im facing the following error:
*** ARCHIVE FAILED **
The following build commands failed:
CpResource /Users/runner/work/1/s/app-dev/ios/App/App/public/Users/runner/Library/Developer/Xcode/DerivedData/App-cpioknpkpzmbvaamhsmwuyximnxr/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app/public (in target 'App' from project 'App')
(1 failure)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
##[section]Finishing: Xcode build (signed)
##[section]Starting: Xcode build (signed)*

Xcode Jenkins Build Failure The following build commands failed: CompileSwift normal arm64

I am trying to setup a continuous integration for an Ios App using Jenkins. I used xcode shell command for build process:
/usr/bin/xcodebuild -workspace "PhoenixiOS.xcworkspace" -scheme
"PhoenixiOSTest" -configuration Release archive
Build triggered and finally the following error displayed
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
The Git code is working other Developers Laptop and The code is working on other work spaces like Desktop with the shell command. Only in Jenkins JOB work space it is producing this Error.
log last lines --code
/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/PhoenixiOS-calcgxkedqnxdqcshfjebjolxcut/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOSTest/IntermediateBuildFilesPath/PhoenixiOS.build/Release-iphoneos/PhoenixiOSTest.build/Objects-normal/arm64/EnableLocationServicesView.d
-num-threads 4 -output-filelist /var/folders/jc/fl1lw1754rvd8568qp_wcf5w00008b/T/outputs-f754ba
/Users/Shared/Jenkins/Home/workspace/Phoenix_IOS_D/PhoenixiOS/PhoenixiOS-Bridging-Header.h:7:9:
error: 'NewRelicAgent/NewRelic.h' file not found
#import "NewRelicAgent/NewRelic.h"
1 error generated.
:0: error: failed to emit precompiled header
'/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/PhoenixiOS-calcgxkedqnxdqcshfjebjolxcut/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOSTest/PrecompiledHeaders/PhoenixiOS-Bridging-Header-swift_344FHIEQ5169K-clang_9521NPKFGEEZ.pch'
for bridging header
'/Users/Shared/Jenkins/Home/workspace/Phoenix_IOS_D/PhoenixiOS/PhoenixiOS-Bridging-Header.h'
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64 (2 failures) Build step 'Execute shell'
marked build as failure
It was due to code Pipeline unable to unzip .git files. better to clone using git ssh.

Resources