---
title: Troubleshoot your first deployment
description: Find a target, fix a build, or reach your running app.
---

Search this page by the symptom or error text. These are troubleshooting entries, not numbered CLI error codes.

## Target not found

Run `wendy discover` on your development machine. Verify that the target is powered on and connected over USB or the same network. On macOS, allow Local Network access when prompted. For USB tethering on Linux, run `wendy discover` in a terminal and accept the prompt to configure the USB link.

If you know the address, try `wendy device info --device <address>`. If this works, use `wendy run --device <address>` to bypass discovery. See [device discovery](../advanced/clients/wendy-cli/commands/discover/).

## Wrong target selected

A saved default bypasses the picker. Use `wendy run --device <name-or-address>` to select a target explicitly, or `wendy device unset-default` to restore interactive selection.

## No ARM64 UEFI firmware found

Run `wendy run` or `wendy tour` in a terminal. When QEMU or its ARM64 firmware is missing, Wendy offers to install it with Homebrew, apt-get, or dnf. To install it yourself on Debian or Ubuntu, run `sudo apt install qemu-system-arm qemu-efi-aarch64`. See [simulator setup](../installation/wendyos-virtual-machine/).

## TLS authentication failed

Follow the CLI's recovery hint. If the device clock may be wrong, run `wendy device sync-time` on the same LAN, then retry. Refresh certificates when the CLI identifies a client-credential problem; a TLS rejection alone does not establish that refreshing will help. Use `WENDY_TLS_DEBUG=1` for connection details.

Simulator startup stops retrying when authentication is rejected. It reports the authentication error without the boot-console tail. See [simulator startup and authentication failures](../advanced/clients/wendy-cli/device-selection/#simulator-startup-and-authentication-failures).

For OIDC sign-ins, automatic certificate re-issuance through the sign-in session
runs at most once per CLI invocation. If another target needs re-issuance in the
same command, run `wendy auth refresh-certs` explicitly and retry. See
[certificate renewal](../advanced/clients/wendy-cli/commands/auth/refresh-certs/).

## Wendy Net connection limit

If you see `Wendy Net is closing a backup connection to free a slot; retry shortly`,
wait briefly and retry your command. The router is making room for another
neighbour, and automatic discovery will retry the connection after the backup
finishes closing.

If the connection does not recover, inspect this computer's connections with
`wendy net topology --local-cli` and check that nearby routers are reachable.
`Wendy Net connection limit reached` means the receiving router has no
available connection slot. See [backup connections and recovery](../advanced/development/local-mesh-radio/#backup-connections-and-recovery).

## Image build fails

Read the first build error above the deployment failure. For the [first app tutorial](../getting-started/app/), confirm that Docker and Buildx are installed and Docker is running, or configure the [Apple Container builder](../advanced/clients/wendy-cli/commands/run/#image-build-args). Use `wendy run --verbose` to keep build output visible.

## Cloud v2 upload connection lost

Check that the device is online with `wendy cloud discover`, then retry the
upload. The CLI identifies unnamed devices by their Cloud ID and reports bytes
sent across resume attempts. A lost connection during upload or while waiting
for the app's start acknowledgement exits with status 5
(`device_unreachable`, retryable). Automatic registry fallback is off after that
transport failure. Use `--chunking=off` to upload through the registry, subject to
the usual authorization. Old Agents without the chunk RPCs keep their registry
fallback in `auto`.
Set `WENDY_TLS_DEBUG=1` to print the underlying upload and reconnect diagnostics
to stderr. The Compose and multi-service chunk-upload path supports `--builder docker` and `--builder buildkit`.
Apple Container keeps its direct registry route; use
`--builder apple-container --chunking=off` to select it explicitly. In `force`,
a missing capability requires an Agent update. See [Cloud v2 uploads](../advanced/clients/wendy-cli/commands/run/#uploads-over-cloud-v2).

## Host port already in use

Another process may own the app's port, which is 5001 for the first app tutorial. Stop that process or change the app's listening port and its readiness configuration together. The simulator forwards the declared TCP readiness port onto your development machine. See [simulator networking](../installation/simulator-management/#reaching-an-app-you-deployed).

## Readiness probe timed out

Check the attached app logs. Open the address printed by `wendy run`, including its port. For a simulator using default networking, this is a loopback address, not the guest's private IP. An older running VM may need a restart to enable application port forwarding.

For a physical target, check that your development machine can reach the reported address. See [simulator troubleshooting](../installation/wendyos-virtual-machine/#troubleshooting) or the [FAQ](../faq/) for further checks.
