You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Embedded core cannot start on Windows when port 7788 is in an OS-excluded range, because the fallback ports 7789-7798 are in the same range #8621
On Windows, Hyper-V / WinNAT / WSL2 / Docker reserve TCP port blocks (netsh interface ipv4 show excludedportrange). Binding 127.0.0.1:7788 fails with WSAEACCES (os error 10013). pick_listen_port_with_policy correctly treats this as an exclusion and tries the fallback pool, but the pool is 7789-7798, the ten ports right next to 7788. Reserved blocks are usually 50-100 ports wide, so the whole pool is excluded too, and the core gives up: "preferred core port 7788 is occupied by port excluded by OS (...); no fallback ports available in [7789..7798]". The app then has no core. TAURI-RUST-8CB: 297 events on 0.64.15 (one user keeps retrying); 16V1 is a second machine.
Likely code path
crates/openhuman-core/src/platform/connectivity/rpc.rs: DEFAULT_FALLBACK_START = 7789, DEFAULT_FALLBACK_END = 7798; pick_listen_port_for_host_with builds the pool; pick_listen_port_with_policy routes 10013 to pick_fallback_port; pick_fallback_port returns NoAvailablePort after the contiguous pool
crates/openhuman-app/src/core_process.rs: start-up path that reports the bind failure
Suggested fix
When the preferred port is OS-excluded (or the contiguous pool is exhausted), fall back to an OS-assigned port (bind(127.0.0.1:0)) and publish it through the existing ready signal (EmbeddedReadySignal.port / fallback_from), which the shell already honours.
Alternatively add a second pool far from 7788 (different 100-port block), but port 0 is the only choice that cannot collide with an exclusion.
Regression test: inject a binder that returns 10013 for 7788..=7798 and assert a port is still picked.
Done when
A regression test reproduces the failure (or the misreport) and passes with the fix
The fix is merged to main
The Sentry issues above are resolved in the next release, and stay quiet on builds that carry the fix
On Windows, the embedded core fails to start when the preferred port 7788 lies in an OS-reserved TCP exclusion range, because the fallback pool 7789-7798 sits immediately adjacent and is typically inside the same 50-100 port reserved block; the core then reports no available fallback port and the app gets no core. Suggested fix is falling back to an OS-assigned port (bind :0) published through the existing ready signal, plus a regression test injecting 10013 for 7788..=7798. Close to zero user impact (2 Sentry issues, ~1-2 users) but a hard start-up failure on affected Windows/Hyper-V machines with no workaround for those users, so p1; no candidate issue covers this port-exclusion failure, so no prior art.
Re-checked on current main (2b07daf): still present. The fallback pool is still 7789-7798, now in crates/openhuman-rpc/src/server/listen_port.rs (lines ~17-18, moved in #8723). pick_fallback_port (around 267-330) still gives up with NoAvailablePort when the whole contiguous range is excluded. There is no OS-assigned (port 0) last resort; serve.rs (~138-147) bails and core_process.rs (~379-406) returns the error.
Next step: fall back to an OS-assigned port when the pool is exhausted (the app already reads the bound port back), plus a test with a simulated excluded range.
Activity
tinysweeper commentedon Nov 9, 2026
On Windows, the embedded core fails to start when the preferred port 7788 lies in an OS-reserved TCP exclusion range, because the fallback pool 7789-7798 sits immediately adjacent and is typically inside the same 50-100 port reserved block; the core then reports no available fallback port and the app gets no core. Suggested fix is falling back to an OS-assigned port (bind :0) published through the existing ready signal, plus a regression test injecting 10013 for 7788..=7798. Close to zero user impact (2 Sentry issues, ~1-2 users) but a hard start-up failure on affected Windows/Hyper-V machines with no workaround for those users, so p1; no candidate issue covers this port-exclusion failure, so no prior art.
Labelled
priority: p1.M3gA-Mind commentedon Nov 16, 2026
Re-checked on current main (2b07daf): still present. The fallback pool is still 7789-7798, now in
crates/openhuman-rpc/src/server/listen_port.rs(lines ~17-18, moved in #8723).pick_fallback_port(around 267-330) still gives up withNoAvailablePortwhen the whole contiguous range is excluded. There is no OS-assigned (port 0) last resort;serve.rs(~138-147) bails andcore_process.rs(~379-406) returns the error.Next step: fall back to an OS-assigned port when the pool is exhausted (the app already reads the bound port back), plus a test with a simulated excluded range.