CircleCI fails to open Xcode

I am using yarn to build a react native ios app. In my config.yml I’m using the CircleCI Mac images with Xcode 12.5.1 . When I invoke the yarn command, I get the following error

The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3762, _LSFunction=_LSOpenStuffCallLocal}
error Command failed: open /Applications/Xcode-12.5.1.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID A8176C67-F1D0-4517-A6B5-A3495829BB1D
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3762, _LSFunction=_LSOpenStuffCallLocal}

I’m not changing anything with regards to the Xcode executable, I’m just using the defaults on the system. Has anyone else encountered this issue?

3 Likes

We are also running into this, and the difference was upgrading from xcode 12.3.0 → 12.5.1

same here, the error occurred after updating to RN 0.65.1 and to xcode 12.5.1, any update on this?

We are also experiencing this issue, on both xcode 12.5.1 and 13.0.0.

12.3.0 works consistently.

Anyone had any conclusion or input from CircleCI?

It’s the same with me with Xcode 13.0
Anyone have a suggestion? I’m looking for a solution for this

It’s the same with me with Xcode 12.5.0, 12.5.1 and 13.0.0, I can’t run my app correctly since 1 month ago.
I’m looking for a solution for this too

Hi guys, I found a solution :grinning:

We need to preboot the simulator before running the tests. In our case we were just trying to open the simulator, which could be ready or not.

Basically we changed the command:
open xcode-select -p/Applications/Simulator.app --args -CurrentDeviceUDID #{simulator_id}

For:
xcrun simctl boot #{simulator_id}

Read more in this article:
https://circleci.com/docs/2.0/testing-ios/#reducing-job-time-and-best-practises

worked perfectly!