Skip to content

Error codes ​

Failures are returned as a tool error result in the form [CODE] message. The message says what to do next.

CodeMeaning
UNSUPPORTED_PLATFORMThe server is not running on macOS.
EXECUTABLE_NOT_FOUNDxcrun or idb is missing. The message explains how to install it.
COMMAND_FAILEDA command exited with an error. Includes the exact command, its output and, when the cause is known, a Hint: line with the fix.
COMMAND_TIMEOUTA command exceeded its time limit.
UNEXPECTED_OUTPUTThe output of an external tool does not have the expected format.
DEVICE_NOT_FOUNDNo available simulator matches the name or UDID.
NO_BOOTED_DEVICEdevice was omitted and no simulator is booted.
AMBIGUOUS_DEVICESeveral simulators match. The message lists the candidates.
DEVICE_NOT_BOOTEDThe operation needs the simulator to be booted.
DEVICE_NOT_SHUTDOWNThe operation needs the simulator to be shut down.
RECORDING_ALREADY_ACTIVEA recording is already in progress on that device.
NO_ACTIVE_RECORDINGThere is no recording to stop.
ELEMENT_NOT_FOUNDNo element on screen matches the query. The message lists what is there.
AMBIGUOUS_ELEMENTSeveral elements match. The message lists them numbered, to choose one with index.
UNSUPPORTED_TEXTThe text contains characters the simulated keyboard cannot type. Use ui_paste_text.
PASTE_UNAVAILABLEThe text was copied, but the field offered no "Paste" option. See Limitations.
APP_NOT_INSTALLEDThe app is not installed on the simulator.
PATH_NOT_FOUNDA file or folder does not exist on the Mac.
INVALID_ARGUMENTA value is syntactically valid but not acceptable.
UNEXPECTED_ERRORAn unforeseen failure. Worth reporting.

Input that does not match a tool's schema (a wrong type, a value out of range) is rejected by the protocol itself before anything runs.

In the code, every error is a subclass of SimulatorError defined in src/domain/errors.ts.

Released under the MIT License.