How to Fix "Error invoking remote method 'hermes:api'" Connection Timeout on Hermes Desktop
Has your Hermes Desktop application suddenly crashed and displayed a red error screen saying "Error invoking remote method 'hermes:api': Error: Timed out connecting to Hermes backend after 60000ms"?
Don't panic! This is a common communication issue between the Electron user interface (frontend) and the Python/Uvicorn server (backend) running in the background. In this article, we will break down the root causes and show you how to fix it step-by-step.
Symptoms
When you launch the Hermes Desktop app, it fails to load the chat dashboard and displays a warning dialog:
Hermes couldn't start
The background gateway didn't come up. Try one of the recovery steps below. Error invoking remote method 'hermes:api': Error: Timed out connecting to Hermes backend after 60000ms.
Even if you click the "Retry" or "Repair install" buttons, the app remains stuck on the loading screen or throws the same timeout error again after a few moments.
Root Causes
Based on a detailed investigation of the system and file logs (desktop.log & errors.log), this timeout error is usually caused by two main issues:
-
Stale/Conflicting Background Processes:
A previouspythonwsession (or a manually executed gateway) is still running in the background, locking the database and active lock files (gateway.lock/gateway.pid). When Hermes Desktop tries to spin up a new backend instance, it gets blocked because the resources are already locked. -
Missing Bootstrap Complete Marker:
The.hermes-bootstrap-completepen marker file inside thehermes-agentfolder is missing or corrupted. This forces the desktop app to think that the backend has never been installed, prompting it to trigger a fresh bootstrap script which ultimately hangs and times out.
Step-by-Step Solution
Follow these steps to clean up the lock files and restore your Hermes Desktop app to a clean boot state:
Step 1: Force Exit Hang/Stale Python Processes
Open PowerShell and run the following command to terminate any lingering Python or Hermes processes running in the background:
Get-Process -Name "pythonw", "python", "Hermes" -ErrorAction SilentlyContinue | Stop-Process -Force
Step 2: Delete Stale Lock Files
The Hermes gateway backend uses lock files to prevent multiple instances from running. Delete these files from your local app data folder:
Remove-Item "$env:LOCALAPPDATA\hermes\gateway.pid" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\hermes\gateway.lock" -Force -ErrorAction SilentlyContinue
Step 3: Recreate the Bootstrap Complete Marker Manually
To make the Electron frontend recognize that your local environment is already set up (saving it from redownloading files or hanging on bootstrap), manually recreate the .hermes-bootstrap-complete file:
- Go to the Hermes Agent installation folder (by default on Windows:
%LOCALAPPDATA%\hermes\hermes-agent). - Create a new file named
.hermes-bootstrap-complete(ensure there is no.txtextension at the end). - Paste the following JSON configuration into the file:
{
"completedAt": "2026-06-28T16:00:00Z",
"schemaVersion": 1,
"pinnedBranch": "main",
"pinnedCommit": null
}
Or, you can do this quickly by running this PowerShell command:
$markerPath = "$env:LOCALAPPDATA\hermes\hermes-agent\.hermes-bootstrap-complete"
$markerContent = '{"completedAt":"2026-06-28T16:00:00Z","schemaVersion":1,"pinnedBranch":"main","pinnedCommit":null}'
Set-Content -Path $markerPath -Value $markerContent -Encoding UTF8
Step 4: Relaunch Hermes Desktop
Once the steps above are completed, launch the Hermes Desktop app again. Behind the scenes, the logs in desktop.log should now show a smooth boot process:
[boot] Resolving Hermes backend
[boot] Resolving Hermes runtime
[boot] Using existing Hermes no-console Python...
[boot] Starting Hermes backend...
[boot] Waiting for Hermes backend to launch
HERMES_DASHBOARD_READY port=55915
[boot] Hermes backend is ready. Finalizing desktop startup
Conclusion
A connection timeout on Hermes Desktop is almost always caused by conflicting background processes or a missing bootstrap marker. By terminating older processes, cleaning up the database lock files, and ensuring the .hermes-bootstrap-complete file is in place, you can get your Hermes AI workspace back up and running smoothly. Good luck!
Post a Comment for "How to Fix "Error invoking remote method 'hermes:api'" Connection Timeout on Hermes Desktop"