Repository navigation
Description
Operating system
Windows 11 x64
Orca version
v1.4.156 (also reproduced on v1.4.150)
Details
Short summary
Signing in to an Orca Cloud profile with Google completes in the system browser and successfully returns to Orca's local loopback callback, but the desktop then shows:
fetch failed
The cloud profile is never linked and no encrypted account session is created. Updating from v1.4.150 to the current stable v1.4.156 did not change the behavior.
Reproduction
- Start Orca on Windows.
- Attempt to connect the active local profile to Orca Cloud.
- Complete Google sign-in in the system browser.
- The browser reaches Orca's
127.0.0.1callback successfully and displays the successful-return page. - Return to Orca.
- Orca reports
fetch failed; the active profile remains local.
Expected behavior
After the loopback OAuth callback succeeds, Orca should exchange the authorization code for a cloud session, persist the encrypted session, and link the active profile.
Actual behavior
The post-callback session exchange fails with a bare TypeError: fetch failed. The UI does not expose an error cause or HTTP status, and the failure is not recorded with useful detail in main.trace.ndjson or daemon.log.
Diagnostics already performed
-
Orca runtime is healthy and reachable.
-
The browser successfully reaches Orca's loopback callback, so the local callback listener and OAuth redirect work.
-
login.onorca.devandrelay.onorca.devresolve and are reachable over HTTPS. -
A diagnostic Node.js request using the same relevant options to:
POST https://login.onorca.dev/v1/desktop/auth/sessionreaches the service and receives the expected response for a deliberately invalid code:
401 Unauthorized {"error":"invalid_code"}
-
No HTTP(S) proxy environment variables are configured.
-
WinHTTP is configured for direct access.
-
Windows Firewall has no outbound block rule for Orca; default outbound traffic is allowed.
-
Only Windows Defender is active; no third-party antivirus/network filter was detected.
-
Windows Time is synchronized via
time.windows.com; an HTTPDatecomparison showed approximately 0.5 seconds of skew. -
The active profile remains
kind: "local", has no cloud metadata, and noaccount-session.json.encis created. -
Fully quitting and restarting Orca does not resolve the issue.
This appears to fail after beginOrcaCloudPkceFlow(...) resolves successfully, during the subsequent authorization-code exchange against /v1/desktop/auth/session.
Source correlation
The shipped v1.4.156 main-process bundle still sends this exchange through bare global fetch(...) with redirect: "error" and a 30-second timeout. The surrounding catch path reduces the error to error.message, so users only see fetch failed and the underlying cause (ECONNRESET, TLS, redirect, socket error, etc.) is lost.
A similar transport/pool pattern was reported for another integration in #5593, although this issue affects the first-party Orca Cloud session exchange and reproduces across a full app restart.
Suggested improvements
- Log the full error name, stack, and nested
error.causefor Orca Cloud session exchange failures, without logging the authorization code, verifier, nonce, state, or tokens. - Surface a bounded failure category in the UI: DNS, TLS, timeout, redirect, connection reset, or HTTP status.
- Consider using
electron.net.fetchfor this first-party request, or retry once on recognized transient Undici transport failures with a fresh connection/dispatcher. - If the backend closes the connection only for otherwise-valid authorization codes, return a structured HTTP error instead so the client does not collapse it into
fetch failed.
Related but distinct reports
- [Bug]: Mobile Relay stays unavailable after a transient desktop broker failure #10273 concerns Relay broker recovery after cloud sign-in already succeeded.
- [Bug]: Mobile Relay host-proof silently rejects every handshake when the local clock is a few seconds off (no skew tolerance) #10401 concerns Relay host-proof clock skew after cloud sign-in.
This report fails earlier, while creating the initial Orca Cloud session.
Made with Orca 🐋
Activity
AmethystLiang commentedon Jul 26, 2026
thanks for reporting it. looking into it!
nwparker commentedon Jul 27, 2026
Repro status: skipped (environment blocked)
Windows Google OAuth callback / cloud session exchange. Requires Windows desktop packaging + live OAuth.
Not labeling
cannot_repro— needs the blocked environment to attempt a full repro.OrcaWin commentedon Aug 16, 2026
#14865 (v1.4.183, Windows) reproduced the same OAuth-callback-succeeds / profile-linking
fetch failedpath and was closed as a duplicate of this issue.Minidoracat commentedon Aug 17, 2026
Root cause found: Electron's bundled CA list is missing the root that
login.onorca.devchains to — no TLS interception requiredReproduced on Windows 11 x64, Orca 1.4.184 (also present on 1.4.183), on an ordinary
residential network with no proxy, no VPN tunnel in use, no corporate TLS inspection, and a
genuine, unmodified Google certificate chain.
I instrumented the running main process (Node inspector via
process._debugProcess, then wrappedglobalThis.fetch) to recover thecausethatprofile-cloud-service.tsdiscards. That is thewhole bug's blast radius: the reason was there the entire time, and nothing surfaced it.
The captured cause
{ "url": "https://login.onorca.dev/health", "chain": [ { "name": "TypeError", "message": "fetch failed" }, { "name": "Error", "code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE", "message": "unable to verify the first certificate; if the root CA is installed locally, try running Node.js with --use-system-ca" } ] }Why it fails
login.onorca.devis Google-hosted. The chain it presents terminates at the cross-signed path:That final root,
GlobalSign Root CA (OU=Root CA), is present in the Windows system trust storebut absent from the CA list Electron 43 bundles. Node does not consult the OS store, so OpenSSL
cannot complete the chain.
Measurements
tls.getCACertificates(kind).length, same machine, same moment:bundleddefaultGET login.onorca.dev/healthUNABLE_TO_VERIFY_LEAF_SIGNATUREELECTRON_RUN_AS_NODE=1Two independent contributors to the failure:
GlobalSign Root CA (OU=Root CA). Node 22's150-root list contains it, which is why a plain
nodeprocess on the same machine succeeds andmasks the problem during triage.
ELECTRON_RUN_AS_NODEdoes.This is why testing the "same binary" from a shell does not reproduce it — a trap worth noting
for anyone attempting a repro.
Live A/B inside the running main process
Nothing else changed between the two probes:
With the merged store in place, the real sign-in completed immediately:
The profile flipped from
kind: "local"tokind: "cloud-linked"and the encrypted sessionartifact was written. Before the patch, that same POST had failed on every attempt across several
app restarts and two releases.
This is broader than sign-in
The same instrumentation caught an unrelated first-party request failing identically in the same
session:
Any Node-side
fetchin the main process to a host whose chain terminates outside Electron's120-root list fails the same way, and — like sign-in — reports nothing usable.
What this adds to the existing reports
machine has no interception of any kind and presents a genuine Google chain, and it still fails.
The trust-store split alone is sufficient. Anyone triaging by asking "are you behind a MITM
proxy?" will incorrectly rule out affected users.
environment — only a Windows machine where Electron's bundled roots do not cover the chain the
Google-hosted endpoint presents.
net.fetch, which uses Chromium's stack andtherefore honours the OS trust store. That PR fixes this, not merely its diagnosability.
It is worth noting that the
wscontrol socket inrelay-control-client.tsstays on Node'sstack, so Relay may still need the trust-store half addressed separately (as raised in [Bug]: Cloud sign-in and Orca Relay fail silently behind TLS-inspecting corporate networks #13735).
Reproduction without a live OAuth flow
No sign-in needed — one request is enough:
Suggested handling
cause.--use-system-ca/tls.setDefaultCACertificates()for anything remaining on Node'sstack, so the
wsRelay control socket is covered too.error.cause.codein the failure toast. Every hour spenton this issue was spent recovering a string the process already had.
Minidoracat commentedon Aug 25, 2026
Correction to my earlier analysis, plus the actual trigger and fix status
On 2026-08-17 I posted a root cause here naming Electron's bundled CA list omitting
GlobalSign Root CA (OU=Root CA)as the reason the chain could not be completed. The mechanism was right; that specific attribution was wrong. Correcting it before it misleads anyone triaging this.What is actually happening
Re-measured today on Windows 11 x64, Orca 1.4.188 (Electron 43.1.0 / Node 24.18.0), ordinary residential network, no proxy and no VPN configured.
The failing process never sees the upstream chain. A locally installed HTTPS-filtering tool re-signs the connection, and the chain the Orca main process receives terminates at that tool's own root — trusted by Windows, absent from Electron's bundled list. That is the root that cannot be verified.
The clincher is that the interception is per-application:
UNABLE_TO_VERIFY_LEAF_SIGNATUREelectron.exe, Electron 43.1.0So the unmodified upstream chain validates fine against Electron's 120 bundled roots:
GTS Root R1is in that list and OpenSSL stops there, never needing the cross-signedGlobalSign Root CAbelow it. My earlier table correctly showed that root missing from the bundle, but it was not what broke the handshake. I had read the chain from a process that was not being intercepted while the failure was occurring in one that was.Why this matters for triage
profile-cloud-service.tsdiscardserror.cause. Any host whose chain terminates outside the bundled list hits it, and every distinct transport failure arrives as the same three words.Fix status
mergeable: true, but its base is ~1840 commits behindmain, last commit 2026-07-27, no human review.dirtysince 2026-08-18, so it cannot merge as it stands.I rebased #15208 onto current
mainand opened it as #16399 (authorship preserved), resolving the conflict and amax-linescollision that makes the naive both-hunks resolution fail lint. It carries a before/after matrix measured inside the intercepted Electron main process, with a negative control to isolate the trust store, and the Relay WSS half that #13735 doubted was covered:HTTP 400is the endpoint's structured rejection of a deliberately invalid authorization code — a complete handshake plus round-trip. No credentials were used.Two gaps that fix does not close:
profile-cloud-service.tsstill collapses failures toerror.messagein three places, so the next transport failure of any kind still reads as a barefetch failed. That half of fix(orca-cloud): report the real cause when cloud sign-in cannot reach the network #10789 is not superseded by fix(cloud): preserve OS trust and network policy for first-party traffic #16399 and is worth landing on its own.global-fetch-call-site-audit.test.tsstill listsmain/rate-limits/codex-fetcher.ts(3 sites) among bare-fetchusers. On the same host those usage requests fail identically and silently degrade the usage badges.Workaround until a fix ships
Nothing needs to be disabled and no verification needs to be weakened. Pointing
NODE_EXTRA_CA_CERTSat a PEM file containing the locally trusted root is sufficient, because Node merges it into the default store at startup. Verified on the affected host: the same request goes fromUNABLE_TO_VERIFY_LEAF_SIGNATUREtoHTTP 200, and sign-in then completes.isdead commentedon Sep 14, 2026
Confirmed local trigger on Windows / Orca 1.4.200: MetaMask interception + AdGuard
I retested this on Windows 11 x64 with Orca 1.4.200 and was finally able to make Cloud profile linking and Orca Relay work.
There were two independent layers of failure:
MetaMask browser extension interception
AdGuard process/network filtering
Additional observations:
This provides a concrete end-user reproduction supporting #16399 for both Cloud HTTP and Relay WSS, and #10789 for preserving/surfacing the underlying error.cause.
It would also be useful for Orca to:
No OAuth code, token, or callback state is included here.