Ionic 5 / Appflow - Preparation failed during iOS Xcode 11 build - xcode

I’ve an error when I build with iOS Xcode 11 on Ionic Pro Hub.
I do not know if the problem comes from Ionic Appflow, or from the code that I build. The problem appears in the build console of Ionic Hub Appflow.
Running with gitlab-runner 10.2.0~beta.147.gbd1f3fcb (bd1f3fcb) on
ip-10-2-128-50 (c93ac604) Creating new VM… ERROR: Preparation failed:
The name ‘runner-c93ac604-project-0-concurrent-0’ already exists. Will
be retried in 3s … Creating new VM… ERROR: Preparation failed: The
name ‘runner-c93ac604-project-0-concurrent-0’ already exists. Will be
retried in 3s … Creating new VM… ERROR: Preparation failed: The name
‘runner-c93ac604-project-0-concurrent-0’ already exists. Will be
retried in 3s … ERROR: Job failed (system failure): The name
‘runner-c93ac604-project-0-concurrent-0’ already exists.

That error message says it is a system failure.
Is this on a self-managed GitLab instance? Or a self-managed GitLab Runner server?
I notice the GitLab Runner version is out of date compared to what's on gitlab.com.
My jobs this morning on gitlab.com say:
Running with gitlab-runner 12.9.0 (4c96e5ad)
You have version 10.2.0~beta.147.gbd1f3fcb (bd1f3fcb)
Can you update to latest stable GitLab Runner?

Related

Azure Devops running iOS XCUITests gives "Failed to start launchd_sim:"

When running my XCUITests on Azure Devops and I use 2 simulators, I get the following error:
Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding)))
When I use one simulator it works. Is there a way to reset the simulator are delete deviated data? Any other idea what could help is highly appreciated.
EDIT: Here are the 2 simulators I run:
destinations: |
platform=iOS Simulator,name=iPhone 8,OS=15.4
platform=iOS Simulator,name=iPhone 14,OS=16.1
I first ran them maxParallel: 4. Now I reduced to maxParallel: 1 with the result that it sometimes works and sometimes not. Really strange.
In the Xcode project I use a testplan where "Execute in parallel (if possible)" is not checked.

Detect network error and retry running task in Azure

Running bash script in Azure pipeline. I am trying to rerun the npm publish step x-times if there is any network error is detected.
Is there any way to detect a network error specifically and rerun the whole task again?
I've found this document (https://learn.microsoft.com/en-us/azure/devops/release-notes/2021/sprint-195-update#automatic-retries-for-a-task) but I believe this reruns the process regardless of the error type.

"Insufficient system resources" when trying to run "git init"

I am trying to create a Jenkins job and noticed that whenever I try to build my maven project, it exits showing the following error in the log (Which happens after about 2 minutes and after the memory usage reaches almost 99%):
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init C:\Users\rami_\.jenkins\workspace\Soc
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:994)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:749)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1300)
at hudson.scm.SCM.checkout(SCM.java:505)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1211)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:636)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:508)
at hudson.model.Run.execute(Run.java:1906)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git init C:\Users\rami_\.jenkins\workspace\Soc" returned status code 1:
stdout:
stderr: error launching git: Insufficient system resources exist to complete the requested service.
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2608)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2538)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2534)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1920)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:992)
... 12 more
ERROR: Error cloning remote repo 'origin'
So I tried to run git init using CMD to check if the problem is Jenkins related or not, and I got exactly the same behavior, which is the two minutes wait, and when memory usage reaches 95-100% it exits and shows the following message:
error launching git: Insufficient system resources exist to complete the requested service.
I have 12 GB installed on my PC and the project I am working with is rather small. Memory usage before running the command is usually around 50%.
I saw some people suggesting to perform "scan disk for errors" which I tried and did not work.
Worth noting that Github desktop is working flawlessly.
The issue was resolved by uninstalling Git, removing all its files under AppData, restarting, and then installing it again.

Error syncing pod on starting Beam - Dataflow pipeline from docker

We are constantly getting an error while starting our Beam Golang SDK pipeline (driver program) from a docker image which works when started from local / VM instance. We are using Dataflow runner for our pipeline and Kubernetes to deploy.
LOCAL SETUP:
We have GOOGLE_APPLICATION_CREDENTIALS variable set with service account for our GCP cluster. When running the job from local, job gets submitted to dataflow and completes successfully.
DOCKER SETUP:
Build image used is FROM golang:1.14-alpine. When we pack the same program with Dockerfile and try to run, it fails with error
User program exited: fork/exec /bin/worker: no such file or directory
On checking Stackdriver logs for more details, we see this:
Error syncing pod 00014c7112b5049966a4242e323b7850 ("dataflow-go-job-1-1611314272307727-
01220317-27at-harness-jv3l_default(00014c7112b5049966a4242e323b7850)"),
skipping: failed to "StartContainer" for "sdk" with CrashLoopBackOff:
"back-off 2m40s restarting failed container=sdk pod=dataflow-go-job-1-
1611314272307727-01220317-27at-harness-jv3l_default(00014c7112b5049966a4242e323b7850)"
Found reference to this error in Dataflow common errors doc, but it is too generic to figure out whats failing. After multiple retries, we were able to eliminate any permission / access related issues from pods. Not sure what else could be the problem here.
After multiple attempts, we decided to start the job manually from a new Debian 10 based VM instance and it worked. This brought to our notice that we are using alpine based golang image in Docker which may not have all the required dependencies installed to start the job.
On golang docker hub, we found a golang:1.14-buster where buster is codename for Debian 10. Using that for docker build helped us solve the issue. Self answering here to help anyone else facing the same issues.

Xcode Bots:: Creating archive failed: xcodebuild exited with status 65

My integration succeeded but archive fails every-time with following warning mentioned below -:
**Warning: Build Service Error:** Creating archive failed: xcodebuild exited with status 65.
**Warning: Build Service Error:** Skipping exporting from archive because creating the archive failed.
I had the same problem. In my case the code signing was set to automatic. When I change it to an distribution certificate it worked.
I was having this issue after updating to the Server beta. I was able to fix it by adding my team to the Xcode server settings.
Its a problem of certificate. Try to check if you have the certificate on your machine corresponding to the build you want to make.

Resources