---
title: How to troubleshoot local development
summary: Symptom-first fixes for local container, port, HTTPS, toolchain, and authentication failures.
owners:
  - architecture-enabling-team
badges:
  - content: Troubleshooting
    backgroundColor: orange
    textColor: orange
---

Use the symptom that matches the failure. Apply the exact fix, then repeat the command that originally failed. For initial setup, see [[doc|development/002-getting-started]].

## Docker and containers

<Accordion title="The application cannot start because the container runtime is unavailable">

**Symptom:** `mise run run` or `docker info` reports that Docker cannot connect.

**Likely Cause:** Docker Desktop is stopped, still starting, or its engine is unhealthy.

**Exact Fix:** Start Docker Desktop and wait for its engine to become ready. Run `docker info`; if it succeeds, retry `mise run run`. If a dependency remains unhealthy, inspect its Aspire console logs before changing local data.

</Accordion>

<Accordion title="A service stays in Starting or exits after its container starts">

**Symptom:** The dashboard shows a dependency or service as unhealthy, starting, or exited.

**Likely Cause:** A dependency is still initializing, the local container lacks resources, or the service reports a configuration error.

**Exact Fix:** In the dashboard, inspect the failing resource's console and structured logs. Confirm its dependency is healthy first, wait for first-boot initialization to finish, then retry. If Docker is resource constrained, close unrelated containers and allocate more memory to Docker Desktop.

</Accordion>

## Ports

<Accordion title="Startup reports that a port is already in use">

**Symptom:** Aspire or a development server fails to bind to a local port.

**Likely Cause:** Another application, an old development process, or a stale container owns that port.

**Exact Fix:** In PowerShell, identify the process listening on the reported port:

```powershell
Get-NetTCPConnection -LocalPort <port> -State Listen |
  Select-Object LocalAddress, LocalPort, OwningProcess
Get-Process -Id <process-id>
```

Replace `<port>` with the reported port and `<process-id>` with the `OwningProcess` value. Stop only the confirmed conflicting process or container, then retry. Do not terminate an unknown process.

</Accordion>

## HTTPS development certificates

<Accordion title="The browser reports an untrusted local HTTPS certificate">

**Symptom:** The browser shows a certificate warning or HTTPS requests fail certificate validation.

**Likely Cause:** The .NET development certificate is missing, expired, or not trusted by the operating system.

**Exact Fix:** Run `dotnet dev-certs https --trust`, accept the operating-system trust prompt, restart the browser, and retry. If the certificate still fails validation, run `dotnet dev-certs https --check` and follow its diagnostic output.

</Accordion>

## Toolchain and PATH

<Accordion title="A command is missing or resolves to the wrong version">

**Symptom:** `dotnet`, `bun`, `node`, or `aspire` is not found, or its version differs from the project requirement.

**Likely Cause:** The project tool version is not installed or mise is not active in the current shell.

**Exact Fix:** Run `mise install`, reopen the terminal, then verify with `mise which dotnet`, `mise which bun`, and the relevant `--version` command. In PowerShell, activate mise for the current session with:

```powershell
mise activate pwsh | Out-String | Invoke-Expression
```

</Accordion>

<Accordion title="Dependency installation fails after changing the tool version">

**Symptom:** `bun install` or `mise run prepare` fails with a runtime or package-manager version error.

**Likely Cause:** The shell is using a global tool version instead of the version selected for this workspace.

**Exact Fix:** Run `mise install`, open a new shell, confirm `bun --version` or `dotnet --version`, then retry the failed install command. Use Bun for JavaScript workspaces; do not mix package managers.

</Accordion>

## Authentication and secrets

<Accordion title="Sign-in returns invalid client or callback URL errors">

**Symptom:** An authenticated page returns `invalid_client`, a redirect mismatch, or an OAuth callback error.

**Likely Cause:** The local Entra application registration, client credentials, or callback URL does not match the application configuration.

**Exact Fix:** Confirm that the configured tenant and client identify the intended Entra application, that its credential is current, and that the registered redirect URL exactly matches the URL reported by the running application. Store local credentials in user secrets or environment variables; never commit them.

</Accordion>

<Accordion title="A local service reports a missing parameter or secret">

**Symptom:** A service exits with a missing-configuration error or Aspire prompts for an unset parameter.

**Likely Cause:** A required local parameter has not been supplied, or a credential was stored under a different setting name.

**Exact Fix:** Use the parameter name in the startup error and inspect the AppHost's stored values:

```bash
dotnet user-secrets list --project <AppHost-project>
dotnet user-secrets set "<setting-name>" "<secret-value>" --project <AppHost-project>
```

Replace placeholders with the exact project and setting from the error. Keep secrets out of source control and do not clear unrelated user secrets.

</Accordion>

For the shortest clean startup, return to [[doc|development/000-local-quickstart]]. For broader environment choices, see [[doc|development/002-getting-started]].
