Description
When running adk web <file>.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
- Start any service on port 8000 (e.g.,
python -m http.server 8000).
- Run an ADK agent using the web command:
- 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 <free_port> 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.
Description
When running
adk web <file>.ts, the CLI exits immediately with a code 0 (success) even if the target port (default8000) is already occupied by another process. It does not provide any error message or warning that the server failed to bind.Steps to Reproduce
python -m http.server 8000).Expected Behavior
The CLI should catch the
EADDRINUSEerror and print a descriptive message:Environment Details
Additional Context
bunx adk run agent.tsworks perfectly (CLI mode).bunx adk web index.ts -p <free_port>works perfectly.npx(Node.js) instead ofbunx, suggesting the error is swallowed within the@google/adk-devtoolsserver implementation.