Travis CI build times out on "Collecting info for testtables..." - xcode

I am building an Xcode project using Travis CI. Whenever Travis build the project, everything succeeds up to this message:
Collecting info for testables...
After that, the build times out and errors.
My .travis.yml file looks like this:
language: objective-c
osx_image: xcode7.3
xcode_project: Project.xcodeproj
xcode_scheme: Project
xcode_sdk: iphonesimulator9.3
I am using Xcode 7.3.1 on the macOS Sierra beta.

It looks like you’re running into a known issue with xctool and Xcode 7.3, which is causing your build to fail. You could try replacing Xcode 7.3 with Xcode 7.2 in your .travis.yml, or you could replace xctool with xcodebuild using the sample script below in your .travis.yml.
script:
- xcodebuild build test -project {test-project} -scheme {test-scheme} | xcpretty
Either option should help you get around the error.

Related

Xcode Server Bot with cocoapods on m1

So I currently am building my project and running tests fine when using xcode 13.2.1 run with rosetta.
However, when I successfully add an xcode server bot and added a preintegration script as below, the following error occurs: "Could not find 'Alamofire' for 'x86_64-apple-ios-simulator', found arm64."
I have tried many different project settings, but this seems similar to the error that I get when I attempt to run my project using xcode without rosetta. I have a feeling the build system that the xcode server bot is using doesn't make use of the same rosetta settings that are used when I build from xcode.
Does anyone know of a way in which I could get the xcode server bot to build the cocoapods project while producing the necessary x86_64 version of Alamofire for the simulator?
#!/bin/sh
cd $XCS_PRIMARY_REPO_DIR
export PATH="$PATH:/opt/homebrew/bin/"
echo "Working Dir: $XCS_PRIMARY_REPO_DIR"
echo "Loading Bash Profile"
source ~/.bash_profile
echo "INSTALLING COCOAPODS"
brew uninstall cocoapods
brew reinstall cocoapods
echo "INSTALLING PODS"
~/.rvm/wrappers/ruby-3.0.0/pod install --verbose

Azure Pipelines iOS Fastlane beta hangs and fails because of timout

I am Using Azure Pipelines to build and deploy the Flutter Application.
I connect my Mac Mini as an Agent to the Azure Pipelines.
Agent Version: 2.173.0
Just as pretext it worked earlier. I am not sure which version it was, but the fact is now it is not working.
Under the hood, it is using Fastlane to
build
download signatures - Fastlane plugin
sign and upload to TestFlight - - Fastlane plugin
If I run the command from the terminal it is working fine:
bundle exec fastlane ios beta --verbose
But if I run it via pipeline it just stacks on a build log and just fails after an hour(timeout).
I have additionally checked during the run if any Dialog has shown up like xCode command tools install or anything. No, this was not the case.
The worst thing I could not determine what's going on because the logs hang as well.
set -o pipefail && xcodebuild -workspace Runner.xcworkspace -scheme Runner -destination 'generic/platform=iOS' -archivePath /Users/{almostGotMe}/Library/Developer/Xcode/Archives/2020-09-02/Runner\ 2020-09-02\ 07.43.05.xcarchive archive | tee /Users/{almostGotMe}/Library/Logs/gym/Runner-Runner.log | xcpretty
Azure Pipelines iOS Fastlane beta hangs and fails because of timout
Since the logs hang as well, we could not locate and analyze the cause of this issue. Fortunately, you could successfully build your Flutter Application in the earlier agent version.
So, the workaround to resolve this issue, we could re-install the old version agent to build this project.
To get the old version agent, we could check the logs of the previous successful pipeline. In the Initialize job, we can see the version information of the agent:
Then we could download old agent version from Github azure-pipelines-agent.

Carthage xcodebuild timed out

I tried to create a Carthage framework using v0.23.0 and Xcode 8.3.3.
When I ran the command "carthage build --no-skip-current", it led to the following error message:
"*** xcodebuild output can be found in /var/folders/h4/1slt67613tx6c_xdd4ffp9nw0000gn/T/carthage-xcodebuild.mOvSot.log
xcodebuild timed out while trying to read
"
Here is my machine's settings:
xcrun version 32.
Xcode command line tool version:
xcode-select version 2347.
xcodebuild -version:
Xcode 8.3.3
Build version 8E3004b
Carthage version:
0.23.0
Please advise.
Thank you,
Helen
I was getting the same problem when I switched to Xcode 9.
After a carthage build or update the following message came up.
xcodebuild timed out while trying to read AWSiOSSDKv2.xcodeproj
I tried to open the xcodeprok using Xcode, close Xcode and then rerun carthage build. The problem was gone.
I believe that it has to do with something that was missing and added once i opened the project in Xcode.
After carthage update I have to reopen the xcode project that timed out and rerun carthage build this time.

Can't run xcodebuild as root

I'm running Xcode 6.4 and trying to build my project using the command line. This works fine without using sudo:
xcodebuild -workspace "project.xcworkspace" -scheme "project"
results in Build Succeeded. However:
sudo xcodebuild -workspace "project.xcworkspace" -scheme "project"
causes the operation to get stuck. I do have Xcode 7.0 Beta installed, is there anyway this could be the issue?
The issue was my schemes were not shared, which caused xcodebuild to get stuck waiting for input
https://github.com/travis-ci/travis-ci/issues/2949

xcode build fails with error code 65 without indicative message

I'm experiencing weird behaviour with my iPhone CI job (running in TeamCity). Every once in a while our build fails without any indicative error in the build log. The build reaches the last stage of codesign validation and I get ** BUILD FAILED ** message immediately after.
These are the last lines of the log of a good and bad builds -
Bad Build
[15:00:56] : [CodeSign] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Library/TeamCity/buildAgent/work/dc055fa257f562be/DerivedData/MyProject/Build/Products/AdHoc-iphoneos/MyProject.app
[15:00:58]W: [Step 3/6] ** BUILD FAILED **
Good Build
[14:09:13] : [CodeSign] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Library/TeamCity/buildAgent/work/dc055fa257f562be/DerivedData/MyProject/Build/Products/AdHoc-iphoneos/MyProject.app
[14:09:13] : [Step 3/6] ** BUILD SUCCEEDED **
Because it's running in a CI I looked for user interaction problems (opening the keychain...etc') but usually xcodebuild spews the relevant errors.
Is there any other log I can dig into to find the cause of the build failures?
EDIT:
Seems I had the same problem like build failed jenkins iOS no error.
I also had a similar problem, in my case it was caused by the fact I'm using both Xcode 7.2 and Xcode 6.4 side by side. When the simulator of Xcode 6.4 is open (iOS Simulator 8.4) and I try to start a test from the commandline using Xcode 7.2 I get this 65 error.
Eg. when iOS Simulator 8.4 is open:
# sudo xcode-select -s "/Applications/Xcode 7.2.app/Contents/Developer"
# xcodebuild test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -workspace "/path/to/MyWorkspace.xcworkspace" -scheme "MyProject" -destination "platform=iOS Simulator,name=iPhone 6,OS=9.2"
(cut)
** TEST FAILED **
# echo $?
65
Solution is to kill the simulator before starting the test:
# killall "iOS Simulator"
# killall "Simulator"
The process is called "iOS Simulator" for XCode 6.4 and earlier and called "Simulator" for later XCode versions.
Had the same problem as build failed jenkins iOS no error
tl;dr - CopyPNG failed because of two images with the same name.
You need to remove platform ios - cordova platform rm ios, and then add platform - cordova platform add ios. now build ios - cordova build ios
I hit this when updating to Xcode 8, in my case it was because I had set the PROVISIONING_PROFILE_SPECIFIER setting incorrectly
For Xcode version 13
The following is what worked for me, this is aimed at Xcode version 13, hoping to be helpful
My React native project was cloned, i was able to run the app in android, but while running on iOS it showed error code 65.
After trying most of the solutions and failing, i got it fixed finally. This is what worked for me, and could be useful for some people hopefully.
Clone the project again(not necessary, just telling you what was done)
npm install
pod install (in iOS directory)
If Xcode shows error code 65, if there is legacy deprecation issue --> go to Xcode -->file --> workspace settings --> Check the box at the end of the window saying "do not show diagnostic issue about build system deprecation
run the project again
This is what fixed it for me.
My issue came up after updating to the latest version of Xcode. To resolve, I performed the following steps.
Completely quit Xcode and the Simulator. I had a zombie Simulator process running that I found and closed through Activity Monitor. Be sure no processes for Xcode or Simulator are running.
In Xcode, open the project found in the ios folder of your react-native project.
Xcode may suggest some recommended updates to modules. I accepted their recommendations.
Close Xcode, relaunch your react-native app

Resources