# Troubleshooting

Each entry starts from what you see. For every status and code, see [Errors](/docs/vaults/reference/errors/). For every check line, see [Check Lines](/docs/vaults/reference/checks/).

## A proof my app uploaded is not in the vault

- **It was uploaded before Octet turned on sealing.** Only later uploads are sealed.
- **It was uploaded in the other environment.** A vault seals one environment. An iOS build that uses the App Attest development environment, an Android build signed with your sandbox certificate, and every simulator or emulator upload as `sandbox`. List with a token for that environment.
- **The proof came through the Octet policy engine,** and your vault seals `INGEST` only. Ask Octet to add `ENGINE`.
- **It was uploaded less than a minute ago.** Sealing usually takes under a minute. List again.

## Every command answers `401`

The token is revoked, or it is not accepted by the vault API. The CLI refuses a missing, malformed or expired token itself, before any request, and names the file or variable it came from. A `vaults:read` token lasts at most 90 days. Mint a new one on the licence's **Vaults** tab. See [Credentials](/docs/vaults/integration/credentials/).

## `404 vault_not_enabled`

The token's licence and environment have no vault. Check that the token was minted for the environment your vault seals. If it was, ask Octet. Registering keys and changing the owner key also answer this while your vault is turned off.

## `opentimestamps` reads ABSENT

The OpenTimestamps proof reaches a Bitcoin block within hours of sealing. Until then the line reads ABSENT. The RFC 3161 timestamp already bounds the time. Run `verify` again later, or export again later to include the Bitcoin anchor.

## A command fails with `cannot ask for the passphrase`

The CLI asks for a key file's passphrase on the terminal. A command run from a script, a CI job or another program that has no terminal can't show that prompt. It exits `4` with `cannot ask for the passphrase`, and names the option and the environment variable that pass the passphrase instead, such as `--key-passphrase-file` and `OCTET_VAULT_KEY_PASSPHRASE`. See [Passphrases](/docs/vaults/reference/cli/#passphrases).

## `cosignatures` reads NOT-CHECKED

You pinned no witness. See [Pin a witness](/docs/vaults/integration/monitor/#pin-a-witness) for Octet's witness key.

## `monitor` exits `2`

An ALERT line names an event that is not on your allow-list.

- **You made the change** without `--allow-list`: add the line it names to `allow.txt`.
- **Octet changed your vault's settings:** check the `policy_changed` hash against the one Octet sent you, then add it.
- **An auditor fetched a grant:** `grant_fetched` always alerts, once per fetch.
- **You don't recognize it:** don't add it. Write to Octet with the output.

## `monitor` flags a recipient key without an owner signature

The vault has an active recipient key that your owner key did not sign. If you registered it before you set the owner key, or after Octet reset your owner key, sign it now:

```bash
octet-vault --token-file admin.token owner sign-key <kid> --owner-key owner.key --allow-list allow.txt
```

If you did not register that key, don't sign it. Write to Octet with the output.

## `verify` exits `3`, INCONCLUSIVE

No check failed, but the result is not established. The first result line names the check that decided it.

- **`app-binding was not checked: no app identity given`:** pass your app's identity, `--android-app-identity` for an Android proof, or `--app-attest-team-id` and `--app-attest-bundle-id` for an iOS proof. To accept a proof from any app, pass `--any-app`. See [App identity](/docs/vaults/concepts/verification/#app-identity).
- **`enrolment-bundle`:** the iOS enrolment the proof names could not be checked. A device's enrolment is archived only if the device enrolled while your vault sealed `INGEST` (see [iOS enrolments](/docs/vaults/concepts/how-it-works/#what-gets-sealed)).

## A command exits `4`

The command could not run: a credential, the network, a key file, a wrong key or passphrase, a server error, or input that cannot be read. The error says which. This is never a verdict on the object. See [Errors](/docs/vaults/reference/errors/).

## `fetch` or `export` refuses the output directory

The `--out` directory has files in it. Pass a new or empty directory, or `--force` to replace the files the two have in common.

## `verify` reports `window-bound-earliest` as an ALERT

The checkpoint that bounds the object was timestamped more than an hour after the object's event. The bound still holds and the verdict stands. A late bound can only make a valid proof look invalid, never the reverse. If it repeats, write to Octet.

## `ykman` fails with `No YubiKey detected`

Plug in the YubiKey and run the command again. When `ykman` asks to run a script, answer `y`. It then asks for the PIV PIN, and the YubiKey for a touch.

## An auditor gets `401 delegate_signature`

The request was signed with a key other than the one the delegation names, or the auditor's clock is more than 60 seconds off. Pass the auditor key file the delegation was made for, and set the clock from the network.
