Diagnose problems¶
Find out why an alis command failed and fix it: read the diagnostics snapshot, interpret the exit code, and apply the known fix for the common errors.
Prerequisites¶
- The CLI installed.
Steps¶
-
Take the diagnostics snapshot:
It shows the CLI, IDE extension and agent plugin versions against the detection cache, your auth state and active account, setup steps installed, settings and the recent log tail. Credentials are never included.
alis doctor --jsongives the same as an object;--no-logsdrops the log tail. -
Read the exit code of the failing command and act on it:
Exit Meaning Fix 1 Usage error or a failed operation. Read the structured failure on stdout (under --json), then the operation'slogsUrioralis logs build|deploy <name> --json.3 Confirmation required. Re-run the envelope's retryafter a human approves. Production needs--confirm-production; other gated commands need--approve.4 Signed out. alis login, then retry.5 Nothing changed before a wait's --timeout.Not a failure; wait again. -
Match the error code in the envelope to its fix:
Code Fix TTY_REQUIREDYou ran bare aliswithout a terminal. Use subcommands with--json.LOGIN_CODE_REQUIREDBare alis loginin a headless call. Usealis login --json, thenalis login <code> --json.ACTIVE_BUILD_ACCOUNT_REQUIREDalis accounts list --json, choose,alis accounts select accounts/<id> --json.ENVIRONMENT_SELECTION_REQUIREDPass -e <env-id>; ids indetailsoralis context view --json.ENV_NOT_FOUNDWrite the product's .env:alis environment refresh <org>.<product>.<env> --output <product>/.alis/.env.TIMEOUTA headless command hit a prompt nobody answered. Run retryonce; if it repeats,alis doctor --jsonhas the command log.NETWORK_UNAVAILABLE,network_unreachableThis machine cannot reach the platform (DNS, sandbox, proxy). Retry once with network access; do not infer an outage. backend_outdatedThe backend predates this feature. Retry later. not_organisation_adminUse alis product requestinstead ofalis product new.CONFIG_REQUIRED,INVALID_CONFIGA dedicated-service block needs a valid --config; the schema is inalis skills load block-<id>. -
Fix the common local problems:
Symptom Fix command not found: alisafter installing~/.alis/bin/alis setup path, then open a new terminal.Git prompts for a password, or fails with a stale http.extraHeaderalis authorise <org>.<product> --jsononce (aliasalis a).Go: unrecognized import path "alis.build/...", or a TLS error fetching a private packagealis packages install <pkg> --language go --json. A fresh clone always needs it once. Do not copy GOPROXY settings from a Dockerfile.Install fails with "no published definition yet" alis define <pkg>first, then retry.Generated types look stale after a define alis packages install <pkg>; for every alis.build dependency,alis packages upgrade <pkg>.Another product's package is missing or stale An admin of the owning product runs alis packages share <that-pkg> --with <your-org.product> --json.An old aliskeeps running after an upgradeRemove the older copy earlier on your PATH, or alis setup path.Workstation: "this workstation is locked to build environment …" Expected; alis workstation open <org>opens the other organisation's workstations. -
Still stuck? Send the snapshot to your build specialist with a short, factual message:
Related: Exit codes, alis doctor, Raise and read support tickets.