Skip to content

macOS: Port conflict resolution options not working in azd app run #47

@spboyer

Description

@spboyer

Description

On macOS, when running azd app run and encountering a port conflict, the interactive prompt appears but selecting any option (kill process, assign different port, or cancel) does not execute the chosen action. The port remains in use and the command appears to hang or fail silently.

This works correctly on Windows.

Environment

  • OS: macOS
  • Command: azd app run

Steps to Reproduce

  1. Start a service using azd app run (e.g., azd-app-dashboard on port 43924)
  2. Without stopping the service, run azd app run again
  3. You'll see the port conflict prompt
  4. Select option 1 (Kill the process using port 43924)
  5. Expected: Process is killed and port is freed
  6. Actual: Nothing happens, port remains in use

Observed Behavior (macOS)

⚠️  Service 'azd-app-dashboard' port 43924 is already in use (PID 14980: jongio-azd-app-windows-amd64)
Options:
  1) Kill the process using port 43924
  2) Assign a different port automatically
  3) Cancel

Choose (1/2/3): 1

After selecting option 1, nothing happens. No confirmation message, no process killed, port still in use.

Expected Behavior (Windows - Working Correctly)

⚠️  Service 'azd-app-dashboard' port 43924 is already in use (PID 14980: jongio-azd-app-windows-amd64)
Options:
  1) Kill the process using port 43924
  2) Assign a different port automatically
  3) Cancel

Choose (1/2/3): 1
Killing process 14980 on port 43924
Killing process 14980 on port 43924
✓ Port 43924 freed and ready for service 'azd-app-dashboard'

Additional Context

All three options appear to be affected:

  • Option 1: Process is not killed
  • Option 2: Different port is not assigned
  • Option 3: Cancel doesn't exit cleanly

This suggests a platform-specific issue in the port conflict resolution logic for macOS.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions