orca icon indicating copy to clipboard operation
orca copied to clipboard

OpenCode Go usage refresh fails with net::ERR_FAILED on Windows despite valid cookie

Open snuffxxx opened this issue 5 months ago • 1 comments

Problem

OpenCode Go usage refresh fails in Orca on Windows with net::ERR_FAILED, even though the same OpenCode Go auth cookie and workspace URL work outside Orca.

This does not look like a local network/proxy issue because other Orca usage providers work and the OpenCode Go page is reachable with the same cookie from Node/PowerShell.

Environment

  • OS: Windows
  • Orca: 1.4.116 (Orca.exe ProductVersion 1.4.116.0)
  • Provider: OpenCode Go usage tracking
  • Workspace ID format: wrk_...
  • Cookie format pasted into Orca: raw Fe26.2**... auth cookie value copied from a currently authenticated opencode.ai browser session

What works

The same cookie succeeds outside Orca:

fetch("https://opencode.ai/workspace/<workspace_id>/go", {
  headers: {
    Cookie: "auth=<Fe26.2 auth cookie>",
    Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    Origin: "https://opencode.ai",
    Referer: "https://opencode.ai"
  }
})

Observed result:

{
  "status": 200,
  "ok": true,
  "finalUrl": "https://opencode.ai/workspace/<workspace_id>/go",
  "redirected": false,
  "hasRollingUsage": true,
  "hasWeeklyUsage": true,
  "hasMonthlyUsage": true,
  "hasWorkspaceId": true,
  "authPage": false
}

Also:

  • https://opencode.ai returns 200 from PowerShell/Node.
  • Claude usage tracking works in Orca.
  • OpenAI/Codex usage tracking works in Orca.
  • Gemini usage tracking works in Orca.

What fails

In Orca's usage tracking UI, OpenCode Go shows:

更新に失敗しました
net::ERR_FAILED

Re-entering the same raw Fe26.2**... cookie and fully restarting Orca did not fix it.

Notes

%APPDATA%\\Orca\\orca-data.json stores settings.opencodeSessionCookie as an encrypted-looking djEw... value. That appears normal because Orca encrypts the setting via Electron safeStorage before persisting it.

I also tested replacing the persisted setting with the raw Fe26.2**... value while Orca was fully stopped, then starting Orca. Orca re-encrypted the value on startup/save, but OpenCode Go still failed with the same net::ERR_FAILED.

Expected behavior

If the pasted cookie can fetch https://opencode.ai/workspace/<workspace_id>/go and the page contains rollingUsage, weeklyUsage, and monthlyUsage, Orca should display the OpenCode Go usage instead of net::ERR_FAILED.

Suspected area

This seems specific to the OpenCode Go fetcher path, possibly the electron.net.fetch(...) request with a manually supplied Cookie header, because the equivalent Node fetch succeeds and other Orca providers work.

snuffxxx avatar Jul 02 '26 09:07 snuffxxx

Attempted — not reproducible on this pass without an OpenCode Go account (needs-info)

This one needs a live authenticated OpenCode Go session (a valid Fe26.2**… auth cookie + a wrk_… workspace URL) to exercise the exact net::ERR_FAILED path, which I don't have on the repro box, so I can't confirm it end-to-end here.

To make it reproducible/diagnosable by an agent, the useful signal is where net::ERR_FAILED originates in Orca's fetch path vs. the working Node/PowerShell fetch. net::ERR_FAILED in an Electron renderer/net request (as opposed to a normal HTTP status) usually points to one of: a blocked cross-origin/Origin header, a session/partition cookie-jar mismatch (the cookie works in your browser but isn't attached from Orca's session partition), a redirect to a disallowed scheme, or a request made from a context whose CSP/permissions block it — rather than a network-reachability problem (you already showed the host is reachable with the same cookie).

Could you attach: (1) the Orca main-process log around the failed refresh (not just the renderer net::ERR_FAILED), (2) whether other cookie-based usage providers succeed from the same install, and (3) confirm the workspace URL/cookie pairing is entered exactly as in your working Node snippet? That will let us localize it to the request construction (headers/partition) vs. the transport.

🔁 Attempted via automated Windows bug-reproduction pass — cannot_repro (requires a live OpenCode Go credential).

OrcaWin avatar Jul 18 '26 08:07 OrcaWin