Skip to content

[Desktop]: error invoking remote method 'hermes:api': Error: net::ERR_INVALID_ARGUMENT #40215

Closed as not planned

Description

@Manfredi-Giudice

Bug Description

Almost every configuration botton on the desktop app gives this error while I use a remote gateway

Steps to Reproduce

  1. Set a remote gateway
  2. Try to change the configuration of the agent, for example the personality

Expected Behavior

The configuration in the remote machine should change

Actual Behavior

A red pop-up saying "error invoking remote method 'hermes:api': Error: net::ERR_INVALID_ARGUMENT" appears

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

System Environment

Hermes Version: 0.15.1 (2026.5.29) [af8b917d]

OS: Linux 6.12.75+rpt-rpi-2712 aarch64

Python Version: 3.13.5

OpenAI SDK Version: 2.24.0

Terminal: local

Gateway Status: running (s6 container supervisor)

Agent Configuration

Profile: default

Primary Model: gemini-3.1-flash-lite

Provider: gemini

Memory Provider: builtin

Toolsets: hermes-cli

Active Skills: 74

MCP Servers: 0

Active Platforms: telegram, discord

Configuration Overrides

agent.max_turns: 150

compression.threshold: 0.7

display.streaming: True

display.show_reasoning: True

fallback_providers: Multiple models configured via OpenRouter and Gemini.

API Keys Status

google/gemini: Set

openrouter: Set

Other providers: Not set

Operating System

Linux 6.12.75+rpt-rpi-2712

Python Version

3.13.5

Hermes Version

0.15.1

Additional Logs / Traceback (optional)

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

  1. added
    type/bugSomething isn't working
    P3Low — cosmetic, nice to have
    area/configConfig system, migrations, profiles
    on Jun 6, 2026
  2. Strontvod commented on Jun 7, 2026

    @Strontvod
    Image

    Sime issue here.

  3. maxim-ultra commented on Jun 9, 2026

    @maxim-ultra

    I took a quick look at the repro details. The failure pattern looks specific to config changes going through a remote gateway, not general app startup.

    A small diagnostic checklist that may help narrow it down:

    • log the exact hermes:api payload when saving a config field like personality
    • compare local vs remote gateway base URL/path normalization
    • confirm the remote gateway exposes the same config mutation route the desktop action expects
    • reject or print any empty/undefined request path before the IPC/API bridge call

    No private logs needed. If useful, I can help turn this into a tighter public repro checklist.

  4. luisTrivinh0 commented on Jun 26, 2026

    @luisTrivinh0

    I get this same problem, how did you solved it?

  5. added
    comp/desktopElectron desktop app (apps/desktop/*)
    duplicateThis issue or pull request already exists
    and removed
    area/configConfig system, migrations, profiles
    on Jun 26, 2026
  6. alt-glitch commented on Jun 26, 2026

    @alt-glitch

    This was generated by AI during triage.

    Duplicate of #40069 — same root cause: Hermes Desktop manually sets a Content-Length header on the Electron net.request OAuth path (fetchJsonViaOauthSession), which Electron 7+ rejects with net::ERR_INVALID_ARGUMENT on any body-bearing POST/PUT (your config-change buttons), while GET reads still work. Tracked there with fix PRs #40174 / #40118 / #40115 / #39857 and the merged salvage #40209.

  7. teknium1 commented on Jul 14, 2026

    @teknium1
    Collaborator

    Thanks for the report. This is already fixed on main; this automated hermes-sweeper review confirmed the duplicate linkage to #40069.

    • b8234e759 removed the manually-set Content-Length from the Electron OAuth net.request path, allowing Chromium to frame body-bearing configuration writes.
    • Current main keeps that behavior in apps/desktop/electron/oauth-net-request.ts:13-15; fetchJsonViaOauthSession uses it at apps/desktop/electron/main.ts:5261-5298.
    • apps/desktop/electron/oauth-net-request.test.ts:22-37 guards against reintroducing the restricted header.
    • The fix is included in v2026.6.19 and later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/desktopElectron desktop app (apps/desktop/*)duplicateThis issue or pull request already existssweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions