google / google/adk-web

`adk web` fails silently when default port (8000) is already in use

Open
#412 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
267
Avg merge
1d 12h
Merged PRs (30d)
9

Description

### **Description**
When running `adk web .ts`, the CLI exits immediately with a code 0 (success) even if the target port (default `8000`) is already occupied by another process. It does not provide any error message or warning that the server failed to bind.

### **Steps to Reproduce**
1. Start any service on port 8000 (e.g., `python -m http.server 8000`).
2. Run an ADK agent using the web command:
```powershell
bunx adk web index.ts
```
3. Observe that the command finishes instantly without output and returns to the prompt.

### **Expected Behavior**
The CLI should catch the `EADDRINUSE` error and print a descriptive message:
> `Error: Port 8000 is already in use. Please use the -p flag to specify a different port.`

### **Environment Details**
* **OS:** Windows 11 (Build 26200)
* **Runtime:** Bun 1.3.5 / Node v23.11.1
* **ADK Devtools Version:** 0.5.0
* **ADK Core Version:** 0.5.0

### **Additional Context**
* `bunx adk run agent.ts` works perfectly (CLI mode).
* `bunx adk web index.ts -p ` works perfectly.
* The issue persists even when using `npx` (Node.js) instead of `bunx`, suggesting the error is swallowed within the `@google/adk-devtools` server implementation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.