Repository navigation
Description
Bug Description
Hermes Desktop fails to complete startup inside WSL2.
The Electron application launches successfully, and the Desktop log reports that the local Hermes backend is ready:
[hermes] [boot] Resolving Hermes backend
[hermes] [boot] Finding an open local port
[hermes] [boot] Resolving Hermes runtime
[hermes] [boot] Using existing Hermes CLI at /home/dfty99/.local/bin/hermes
[hermes] [boot] Starting Hermes backend via existing Hermes CLI at /home/dfty99/.local/bin/hermes
[hermes] [boot] Waiting for Hermes backend to become ready
[hermes] [boot] Hermes backend is ready. Finalizing desktop startup
However, the Electron process repeatedly reports:
Error occurred in handler for 'hermes:api': Error: Timed out connecting to Hermes backend after 15000ms
The Hermes TUI and Web Dashboard both work normally on the same installation.
Stopping the Dashboard, disabling VPN/TUN mode, clearing Electron configuration, and rebuilding the Desktop application do not change the behavior.
Steps to Reproduce
Install or upgrade Hermes Agent to v0.16.0 inside WSL2.
Confirm that the TUI works:
hermes
Confirm that the Dashboard works:
hermes dashboard
Stop the Dashboard.
Launch Desktop:
hermes desktop
Observe that the Electron window launches but cannot communicate with the backend.
Observe repeated 15-second API timeout errors in the terminal.
Expected Behavior
After the Desktop log reports:
Hermes backend is ready. Finalizing desktop startup
the Electron renderer should connect to the backend and display a usable Desktop interface.
Actual Behavior
The backend readiness check succeeds, but Electron IPC/API requests repeatedly time out:
Error occurred in handler for 'hermes:api': Error: Timed out connecting to Hermes backend after 15000ms
The terminal also shows:
Failed to connect to socket /run/user/1000/bus: No such file or directory
The Electron window itself launches, so it is unclear whether the DBus warnings are relevant.
Affected Component
Other
Messaging Platform (if gateway-related)
No response
Debug Report
Report:
https://paste.rs/E9NWc
agent.log:
https://dpaste.com/FAVFBF7K6
gateway.log:
https://dpaste.com/C88YEUVXN
desktop.log:
https://paste.rs/3PhRv
These debug links expire automatically after 6 hours.Operating System
Ubuntu 24.04.3 LTS on WSL2 (Windows 11 build 10.0.26200.8457)
Python Version
3.11.15
Hermes Version
0.16.0 (2026.6.5)
Additional Logs / Traceback (optional)
The Desktop backend reports that it is ready, but Electron API requests still time out:
[hermes] [boot] Hermes backend is ready. Finalizing desktop startup
Error occurred in handler for 'hermes:api':
Error: Timed out connecting to Hermes backend after 15000ms
The terminal also reports:
Failed to connect to socket /run/user/1000/bus: No such file or directory
The TUI and `hermes dashboard` both work normally on the same installation.Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?
- I'd like to fix this myself and submit a PR
Activity
m0st4f4-hub commentedon Jun 11, 2026
Same race on native Windows 11 (not WSL)
Reproduction steps on Windows 10/11 (PowerShell, no WSL involved):
install-main.ps1— fails atdesktopstage withExpected "0.28.0" but got "0.27.7"(lockfile/esbuild). Mitigated by cherry-picking fix: sync npm lockfile node types #44024..hermes-bootstrap-completeis written.hermes dashboarditself crashes with Windows fatal exception 0xC0000005 inos.execvpe(hermes_cli/main.py). Mitigated by cherry-picking fix(cli): skip dashboard re-exec on Windows to avoid execvpe segfault #44355 (thesys.platform == "win32"guard).web_distpre-built, launch packagedHermes.exe(apps/desktop/release/win-unpacked/Hermes.exe).logs/desktop.logreports a clean handshake:So
main.cjs'swaitForBackendReadyreturns success, and the renderer loads. Despite that, ~60s later the renderer surfaces:(Identical dialog "Hermes couldn't start - The background gateway didn't come up" with Retry / Repair install / Use local gateway / Open logs.)
Backend is actually up the entire time
Probing port 9120 directly while the dialog is showing, all from native Windows:
Process tree at the moment of timeout:
So the discrepancy isn't backend death; it's that
main.cjs's readiness probe (the one that prints "Hermes backend is ready") and the IPC handler that backshermes:apiuse different ready conditions, and the IPC handler's first request races the gateway's middleware/auth init, then sits on a 60s timeout.Clicking Retry on the dialog connects instantly because the second request hits the now-warm uvicorn worker.
Suggested upstream fix (sketch)
Either:
main.cjs'swaitForBackendReady(~line 2520-3790, three call sites that throw "Timed out connecting to Hermes backend after ${timeoutMs}ms") wait for an authenticated round-trip on the same code path thehermes:apiIPC handler uses, instead of the cheaper liveness probe; orhermes:apiIPC handler short-circuit the timeout whilewaitForBackendReadyis still pending, retry once after backoff, and only surface the dialog after N retries.Either way the symptom — "boot says ready, first IPC times out 60s later, Retry fixes it" — should disappear.
Environment
v0.16.0 (2026.6.5) · upstream 8505e9d6 · local 7237683e (+3 carried commits)Local stack on top of
origin/main:650b86aa0 fix: sync npm lockfile node types← fix: sync npm lockfile node types #4402469b9dfa22 fix(cli): skip dashboard re-exec on Windows← fix(cli): skip dashboard re-exec on Windows to avoid execvpe segfault #443557237683ea fix(desktop): trust bundled venv install w/o marker← [Bug]: Desktop install loop on macOS — launcher uses system python3 (3.9) instead of bundled venv, hermes_cli import fails, gateway never starts #43913 / PR fix(desktop): trust bundled venv install without marker (#43913) #43983apps/desktop/release/win-unpacked/Hermes.exebuilt at commit4d6a133a(so fix(desktop): trust bundled venv install without marker (#43913) #43983'sactive-install.cjschange is not in the runningapp.asar; bypass currently relies on the existing marker check in the oldermain.cjs).teknium1 commentedon Jul 14, 2026
Thanks for the detailed WSL2 report. This is already fixed on current main by the Desktop startup-timeout work; the native-Windows follow-up's cross-reference to #48504 matches that fix.
Automated hermes-sweeper review:
4aad27b751dd764bd32aa56fca8375846a0fdba3(fix(desktop): extend startup long-timeout to the whole boot data burst) explicitly fixes [Bug]: Desktop remote startup fails when profile listing exceeds hardcoded 15s API timeout #48504.apps/desktop/src/hermes.ts:60-71defines the 60-second startup request timeout for the post-readiness boot burst that previously produced the 15-second backend timeout.apps/desktop/src/hermes.test.ts:96-124verifies the long timeout for boot data requests while retaining the short/api/statusliveness probe.v2026.7.7.