Helpppp ! I just want to get my pipeline run successfully T.T Anyone can help me here~

Situation: I am integrating Apollo client in my iOS project and following the instruction provided by official Apollo - https://www.apollographql.com/docs/ios/installation (using SPM way to setup). It works all fine for me in Xcode manual compile and testing. However, when I am using the command to run the unit test, I got stuck while generating Apollo GraphQL API. Below is the error I have received while running xcodebuild test -scheme ${CI_PROJECT_NAME} -project ${CI_PROJECT_NAME}.xcodeproj -destination "${XCODE_APPLICATION_PLATFORM}" -enableCodeCoverage YES| xcpretty -s

Error: xcodebuild[10347:2192409] NSFileHandle couldn't write. Exception: *** -[_NSStdIOFileHandle writeData:]: Broken pipe

Note: This error occurs while I am running unit test through command line in Gitlab pipeline. Using Xcode 13.2.1.

enter image description here

1

There are 1 answers

0
Liam On

I found this article online: https://peterthomashorn.info/blog/broken-pipe-in-gitlab-with-xcpretty/

It suggests setting the LC_ALL environment variable in gitlab CI to en_US.UTF-8. I believe this is setting the character encoding to UTF-8 so that xcpretty doesn't choke on the bytes being piped into it.