Automattic / Automattic/studio
Port conflict when running Studio under multiple macOS user profiles simultaneously
- Dominant language
- TypeScript
- Stars
- 517
- Forks
- 95
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 162
Description
### Quick summary
Studio's automatic port assignment doesn't account for sites running under a different macOS user profile. If a site is already bound to a port in one profile's Studio instance, starting a site assigned the same port from a second profile's Studio instance fails with EADDRINUSE, even though Studio believes it auto-manages ports to avoid exactly this kind of collision.
### Steps to reproduce
Log into macOS Profile A, open Studio, and start a site (e.g. assigned port 8881).
Switch to macOS Profile B (via Fast User Switching, without quitting Profile A's session) and open Studio.
Attempt to start a site in Profile B that has also been assigned port 8881.
### What you expected to happen
Studio's automatic port management should detect that port 8881 is already in use (even by another OS user/profile) and either assign a different free port automatically, or surface a clear message explaining the conflict.
### What actually happened
The site fails to start with a raw Node-level error:
Failed to start site: Failed to start WordPress server: listen EADDRINUSE: address already in use ::1:8881
This is confusing because the port was auto-assigned by Studio, not manually chosen, and there's no indication in the UI that the conflict is coming from another profile's running site rather than an unrelated app.
### App or CLI?
Studio App
### Version
1.22.0-dev37
### Impact
One
### Available workarounds?
Yes, easy to implement
### Platform
Mac
### Architecture
ARM64 (Apple Silicon, Windows or Linux on ARM)
### Logs or notes
_No response_
Contributor guide
Research direction
Start with Studio App's automatic port-assignment and site-start flow, then reproduce the conflict using two macOS user profiles with both sites assigned port 8881. Trace how an occupied port is detected and how the startup error reaches the UI. Done means a cross-profile conflict selects another free port or displays a clear explanation instead of the raw EADDRINUSE error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, node.js, typescript
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100