How to troubleshoot local development
Symptom-first fixes for local container, port, HTTPS, toolchain, and authentication failures.
Use the symptom that matches the failure. Apply the exact fix, then repeat the command that originally failed. For initial setup, see Getting StartedCustom DocGetting StartedTool requirements, editor options, local configuration, and common commands for contributing to BookWorm.Ownerarchitecture-enabling-teamOpen doc.
Docker and containers
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.
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.
Ports
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:
Get-NetTCPConnection -LocalPort <port> -State Listen | Select-Object LocalAddress, LocalPort, OwningProcessGet-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.
HTTPS development certificates
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.
Toolchain and PATH
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:
mise activate pwsh | Out-String | Invoke-ExpressionSymptom: 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.
Authentication and secrets
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.
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:
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.
For the shortest clean startup, return to Run BookWorm locallyCustom DocRun BookWorm locallyThe shortest path from a prepared machine to a responding local BookWorm application.Ownerarchitecture-enabling-teamOpen doc. For broader environment choices, see Getting StartedCustom DocGetting StartedTool requirements, editor options, local configuration, and common commands for contributing to BookWorm.Ownerarchitecture-enabling-teamOpen doc.