Skip to content

Recurring "Duplicate request id" error (code 103) — stale regionEnv=cn cache routes India users to China servers #33

@shah786628

Description

@shah786628

Bug Report: Recurring "Duplicate request id" Error

Environment

  • OS: Windows 25H2
  • Location: India (IST timezone)
  • AccountID: 183012 (from qodercli.log)
  • Qoder Version: Latest

Error Message

error: code = 103 message = {"code":"103","message":"Duplicate request"} details = []

Root Cause (confirmed)

cache.json persists regionEnv = "cn" (China) for users in India.

Failure chain:

  1. regionEnv = "cn" — India user routed to China NES node
  2. NES latency spikes to 400ms+
  3. Client times out, retries same request
  4. Server receives duplicate request IDs, returns error code 103

Cache File Evidence

Before fix (cache.json):

  • regionEnv: cn
  • NES latency: 193 ms
  • Inference latency: 192 ms
  • Center latency: 170 ms

After manual cache clear:

  • regionEnv: '' (reset, re-probed on next start)

Fix log:
[2026-05-18 15:05:06] cleared cache.json regionEnv=cn->''
[2026-05-18 15:05:06] cleared config.json env=local->''
[2026-05-18 15:05:06] cleared region-config-cache.json
[2026-05-18 15:05:06] network: api2=PASS center=PASS

Affected Files

  • %APPDATA%\Qoder\SharedClientCache\cache\cache.json — regionEnv sticks as "cn"
  • %APPDATA%\Qoder\SharedClientCache\cache\config.json — env sticks as "local"
  • %APPDATA%\Qoder\User\region-config-cache.json — stale node endpoints

Frequency

Recurring — happens repeatedly, requires manual cache clearing each time.

Requested Fix

  1. Auto-detect stale regionEnv on startup — re-probe if cached region mismatches IP geolocation
  2. Invalidate region cache when latency exceeds ~300ms threshold
  3. Add a "Reset Region / Re-probe Servers" button in Settings UI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions