openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Core server fails to start on Windows when port 7788 is in use — no recovery

Open graycyrus opened this issue 6 months ago • 0 comments

Summary

On Windows, if port 7788 is already in use (previous instance, another process), the core server fails to bind and the app becomes completely non-functional. There is no port conflict detection, retry on alternate port, or user-facing guidance.

Sentry Issues

Error: Failed to bind to 127.0.0.1:7788: (os error 10013) / embedded core server exited with error: (os error 10013) Environment: production Platform: Windows 10.0.26200, x86_64 (single user)

Analysis

  • All 10 events from the same user within ~10 minutes — repeated app launch attempts
  • Windows error 10013 = WSAEACCES — either port is already bound or a firewall/antivirus blocks it
  • The user likely has a zombie previous instance holding the port, or a security tool blocking localhost binds
  • The app gives no guidance — just silently fails to start

Suggested Fix

  1. Kill stale process — on startup, check if port 7788 is in use by a previous openhuman instance and kill it
  2. Port fallback — try alternate ports (7789, 7790, ...) if the primary is taken
  3. User-facing error — show a dialog: "Port 7788 is in use. Close the other OpenHuman instance or restart your computer."
  4. Single-instance guard — use a system mutex/named pipe to prevent multiple launches

Priority: Medium — blocks app startup on Windows, single user so far

graycyrus avatar May 13 '26 09:05 graycyrus