# Troubleshooting

> The limits a test runs into, and what each common failure means.

## Known limitations

- **Two machines boot at a time.** A fleet of six takes about three boot times to come up. The configuration key `maxParallelBoots`, in the service's settings file `policy.json`, sets how many machines boot at once.
- **The PC keeps 12 GiB of memory free.** A machine that would leave less is refused with `CAPACITY_REFUSED`. Each machine's starting memory counts, not the most it may grow to. The configuration key `hostReserveMiB` changes the reserve.
- **20 GiB of disk stays free** on the drive that holds the images (`minFreeDiskGiB`).
- **`exec` cannot show windows.** It runs as SYSTEM in session 0. To show a program on the screen, start it with `desktop launch`.
- **The desktop user is a standard user.** A program that needs administrator rights raises an elevation prompt. `endia desktop uac` answers that prompt in images that set `PromptOnSecureDesktop` to 0.
- **Addresses on the Default Switch change** when the PC restarts. Use names: service names between machines, `host-gateway` for the PC.
- **The evaluation edition ends** 90 days after its root image was prepared, as each image's `eastindia.evaluation.expires` label says. Prepare the root image again from a newer Windows disc before then, and rebuild the images over it.
- **A restart of the service** stops any build or import that was running, marks it `interrupted` and removes its machines and disks. Fleet machines keep running, and the service picks them up again when it starts.

## Common errors

- `Windows refused access to the EastIndia service` means your account is not in `eastindia-users`, or joined it after you signed in. The installer adds the person who ran it; sign out and in again after joining.
- A `desktop` command that fails with `DESKTOP_UNAVAILABLE` found no visible window for the process: the program had not yet shown its window, or had closed it. Wait for the window with `desktop windows` and try again.
- A selector that matches nothing fails with `ELEMENT_NOT_FOUND` and the step of the path that failed; one that matches several fails with `ELEMENT_AMBIGUOUS`. Make the selector match one element by adding an automation ID (`#CustomerName`) or a position (`:2`).
- `ELEMENT_NOT_FOUND` for a selector that does not start with a window, such as `Button[Save]`: start it with the window, `Window/Button[Save]`.
- A selector whose first segment matches none of the process's windows fails, and the tree in the error shows the windows' own elements **without their children**, even when the windows have some. An empty `children` list there does not mean the window is empty. Read the window with `desktop inspect`, then correct the selector's first segment: often it says `Menu` where the window's control type is `Window`.
- A password field refuses `keys`, `set-value` and `pointer` with `ACTION_UNSUPPORTED`, and `inspect` never shows its value. Enter a password with `set-value --secret-stdin`.
- `CAPABILITY_MISSING` from `desktop tray` or `set-value --secret-stdin` means the machine's image was made from a root image prepared with an East India that did not have them. Prepare the root image again and rebuild the images over it.

## Diagnostic commands

- `endia operation ls` lists the long-running work: builds, imports and `compose up`. `endia operation logs <id>` shows what it printed, and `endia operation cancel <id>` stops it and removes what it created.
- `endia compose -p "$run" ps -a` and `endia ps -a` show every machine, stopped ones included, with its state, health and exit code.
- `endia compose logs <service>` shows what a machine's main process printed.
- `endia stats` shows each machine's processor, memory, disk and network use, and the PC's own processor and memory use.
- `endia info` lists what needs attention on the service: records the service could not read, objects whose owner no longer exists, and interrupted operations.

## Clearing up

`endia system prune` deletes stopped machines, images that are not in use and objects that no longer belong to anything. An image is in use when a machine uses it or another image is built on it. Without `--all` (`-a`), only the images without a tag are deleted; with it, every image that is not in use is deleted, tagged or not. Volumes are never deleted by the prune. `endia system df` shows the disk space each kind uses.
