Each code is stable and belongs to one exit class. Running a command again does its work again, and one gated on an approval asks the owner again, so ask the person before such a run. Each class below says when another run can help.
Exit 1 is a problem with a local input or a missing confirmation. Another run helps once the input is fixed or the confirmation given.
file-not-found,file-unreadableandfile-emptymean the named file cannot be used. Check its path and permissions, and that it is not empty.file-rejectedmeans the Ark or ark refused the file's content, and the message says why. Fix the file, or use another one.invalid-slotmeans the Ark identified another slot than --slot names, or has no such slot.ark data listshows the slots.invalid-keymeans --pubkey is not a valid public key.invalid-versionmeans the build given toark firmware updateis not published for this environment.ark firmware listshows what is.confirmation-requiredmeans installing firmware needs confirmation. Add --yes toark firmware update.enrollment-requiredmeans the Ark is enrolled in a browser at Ark Hub, at the address the hint gives. Enroll it there.iomeans a local read or write failed. The message names what failed.
Exit 2 is usage, for invalid arguments or an unknown help topic. Another
run helps once the arguments are fixed, as the hint or the command's help
shows. A slot of 0 or below is a usage error, and a positive one the Ark
lacks is invalid-slot.
Exit 3 is a problem reaching the Ark. Another run can succeed once the Ark
is attached, selected and free, unless handshake-failed names a failed
verification.
no-devicemeans no Ark is attached, or none matches --device. Runark devices.ambiguous-devicemeans several Arks match. Pick one with --device from the selectors the hint lists.device-busymeans another ark command or an Ark Hub browser tab holds the Ark. Wait for the command to finish, or close the tab.device-unreachableanddisconnectedmean the connection failed or dropped. Check that the Ark is plugged in or the emulator is running. On Linux, a permission error's hint gives the udev rule.handshake-failedmeans the handshake did not complete, and the message says why. A connection that dropped during it can pass on another run. A failed verification, such as an attestation signed by an unknown key, needs the identity fixed, andark help devicescovers enrollment and recovering an identity.
Exit 4 is a problem with the cloud, which usually passes. Run the command
again after a short wait, once any login or approval hint is followed.
Another run cannot fix environment-unknown or registry-inactive.
cloud-unreachablemeans a request to the cloud, the package host or the relay failed. Check the network.approval-undeliveredmeans the approval never reached the phone. The warning before it names the cause, andark doctorchecks the relay.environment-unknownmeans no cloud environment is known. Select one with --env.login-requiredmeans a develop or staging host wants a browser login. The hint gives the cloudflared command to run.proof-rejectedmeans the cloud refused the Ark's proof. Runark doctor. A firmware update refreshes the keys first, so run it again.pairing-failedmeans the pairing exchange failed in the cloud or on the phone. Runark pairagain.registry-inactivemeans the Ark's registration is disabled, expired or superseded. A disabled Ark needs Dark Bio. An expired or superseded emulator becomes a fresh device throughark-emulator stop,wipeandstart, and is then enrolled again.
Exit 5 is the Ark's state or its refusal. Another run helps once the state or the request is fixed.
not-pairedmeans no phone is paired with the Ark yet. Runark pair.lockedmeans the Ark needs unlocking. Runark unlock, or add --unlock. A dry run needsark unlockfirst.already-pairedandalready-enrolledmean the Ark is in that state already.ark statushints at the next step.firmware-outdatedmeans the firmware is older than this tool supports. Runark firmware update, or install a newer Ark Emulator for an emulator.update-unverifiedmeans the Ark came back from a firmware update running another build than the one installed. Checkark statusandark firmware listbefore choosing a build again.dependency-missingmeans the slot requires another that is not filled, such as small-variants. Fill that one first.slot-filledmeansark data fetch --samplefound a personal slot that holds data, damaged or not, since a sample never mixes with other data. Empty each slot the hints name, then run it again.no-downloadmeans the Ark offers no download for the slotark data fetchnames.ark data showshows the slot's requirements, andark data fetch --samplefills the personal slots with a public sample instead.arkmeans the Ark refused the request. Act on its message, never on its number, which can change between firmware builds.unsupportedmeans the Ark never serves the request in its build or role, such as a firmware update on an emulator.unavailablemeans the Ark serves the request, but not in its current state, such as before a cloud sync.ark doctorfinds what is missing.unknownmeans the Ark does not know the request, so the firmware and ark are out of step. Update both.unansweredmeans the Ark dropped the request without an answer. Runark doctorbefore running the command again.
Exit 6 is an approval that did not come. Ask the person before running the command again, since another run asks the owner again.
approval-deniedmeans the owner declined the request or an app's report, or Ark Companion sent an answer the Ark could not accept. Ask the person whether they want another attempt.approval-timeoutmeans nobody answered within the window. Ask the person to have the phone or the Ark at hand for another attempt. For pairing, runark pairagain.
Exit 7 is timeout, for a wait on a machine that ran past --timeout or past
a fixed limit. Such limits are the 5s handshake that opens a connection and
the 120s an Ark gets to return from a firmware update. A reference download
also fails after 30s without an acknowledgment. Another run may succeed.
Check the connection and ark status first, and raise --timeout for a slow
machine.
Exit 8 is app-failed, for an app that reported failure when the owner
released its result. The document still holds what the Ark returned. Read
the report, and fix the app or its inputs before running it again.
Exit 130 is interrupted and exit 143 terminated, for Ctrl-C and SIGTERM.
ark asks the Ark to cancel the active task or upload before it exits, and
under --json the document holds the last partial result. An upload the Ark
is already processing keeps going. Another run can finish the work. Check
the partial result and ark status first, and ask the person before another
approval.