Repository navigation
Description
Operating system
macOS (the Node-vs-Chromium trust split is not platform specific, so Windows and Linux should behave the same)
Orca version
v1.4.178
Details
Short summary: Three separate user-visible failures — sign-in never completing, Relay pairing codes failing to mint, and Relay refusing to connect after a successful sign-in — all come from one cause. Orca's cloud requests leave on Node's network stack, which does not consult the OS trust store. On a network that terminates TLS with a corporate root CA, the browser half of every flow succeeds and the app half fails, and nothing in the UI says why.
What happened?
Behind an inline TLS-inspecting corporate VPN:
- Sign-in —
shell.openExternalopens the browser, login succeeds there, then the app sits doing nothing until the 5-minuteAUTH_TIMEOUT_MSexpires. When an error does surface, the toast description readsfetch failed. - Relay pairing —
Couldn't create a Relay pairing code.with no reason given.Copy diagnosticsyields"code": "relay_mint_failed", which is the fallback constant rather than the real error. - Relay connect — signing in with the VPN off works, but turning the VPN back on makes Relay fail again. The stored token is fine; the next leg hits the same wall.
Root cause
The chain presented for relay.onorca.dev on that network (identifiers redacted):
0 s:CN=relay.onorca.dev
1 s:CN=<redacted> Forward Trust CA
2 s:CN=<redacted> Root CA
The corporate root is installed in the macOS System keychain, so Chromium — and therefore every browser step of every flow — trusts it. Node ships its own CA list and does not consult the OS store, so Orca's own requests to the same host are rejected.
$ node -e "fetch('https://relay.onorca.dev/').then(r=>console.log('OK',r.status)).catch(e=>console.log('FAIL',e.cause?.code))"
FAIL SELF_SIGNED_CERT_IN_CHAIN
$ NODE_EXTRA_CA_CERTS=~/corp-root.pem node -e "…same…"
OK 404
$ node --use-system-ca -e "…same…"
OK 404OK 404 is the handshake succeeding; / simply has no route. So reachability and DNS are fine and this is purely a trust-store problem.
It is also not a proxy-configuration problem. The interception is transparent, so session.resolveProxy() reports DIRECT and the existing ensureElectronProxyFromEnvironment() bridge in src/main/network/proxy-settings.ts has nothing to act on. That bridge only reconfigures the Electron session in any case, which does not affect Node's global fetch.
Affected call sites
| Location | Transport |
|---|---|
src/main/orca-profiles/profile-cloud-client.ts:163 |
token exchange, global fetch |
src/main/runtime/relay/relay-http-client.ts:93 |
relay token exchange, input.fetch ?? globalThis.fetch (production default is Node/undici) |
src/main/runtime/relay/relay-http-client.ts:126 |
/v1/assign, same |
src/main/runtime/relay/relay-control-client.ts:72 |
relay control socket, ws constructed with no agent |
Where the reason is lost
src/main/orca-profiles/profile-cloud-service.ts:90returnserror.message. For a transport failure that string isfetch failed;error.cause.codeis dropped.src/shared/mobile-relay-mint-failure.ts:17keeps a code only when it matches/^relay_[a-z0-9_]{1,74}$/, soSELF_SIGNED_CERT_IN_CHAINis discarded for therelay_mint_failedfallback. The call site atsrc/main/runtime/runtime-rpc.ts:881deliberately refuses to log raw provider errors because they may carry request metadata or credentials — a reasonable constraint, but today the result is that no sanitized cause survives either.
How can we reproduce it?
- Join a network that performs TLS inspection with a corporate root CA (or install any MITM root and route through it).
- Confirm the root is trusted by the OS — the browser reaches
https://relay.onorca.devwithout warnings. - Run the
node -esnippet above →SELF_SIGNED_CERT_IN_CHAIN. - In Orca, sign in to Orca Cloud → the browser reports success, the app never does.
- Choose Orca Relay in mobile pairing →
Couldn't create a Relay pairing code.
Expected
The inconsistency is what I'd like to flag rather than any particular remedy: within one app, the built-in browser and the update path go out through Chromium and honour the OS trust store, while cloud sign-in and Relay go out through Node and do not. Whichever way that is resolved, a failure of this kind should name its cause instead of timing out silently.
Anything else that might help?
- This may be the explanation for [Bug] Orca relay for mobile #10425 (relay can't be reached, falling back to local), which has 8 comments and no identified cause.
- Related prior art: #521 / #800 on
HTTP_PROXY, referenced atsrc/main/rate-limits/claude-fetcher.ts:55. Distinct problem — those are explicit proxies, this is transparent interception plus trust. tls.getCACertificates('system')returns only 11 certs here and does not include the corporate root, even though the--use-system-caflag works. A runtimetls.setDefaultCACertificates(tls.getCACertificates('system'))would therefore not be a fix on macOS.- Workarounds that do work today: launch with
NODE_EXTRA_CA_CERTS=<corp-root.pem>(note thatopen -a Orcadoes not propagate env — the binary has to be launched directly, orlaunchctl setenvused), or avoid the cloud entirely by pairing over LAN with Tailscale.
On fixing it
I've opened a small PR for the diagnostics half only — preserving an allow-listed transport error code so the sign-in toast and the Relay Copy diagnostics payload name the cause. It changes no transport, TLS policy, or trust store, and makes nothing succeed that fails today.
The transport half seems like yours to direct, so I'd rather ask than guess. net.fetch would inherit Chromium's trust store and system proxy for the HTTP legs, but the ws control socket has no equivalent, and I don't know how you'd want that to interact with the SSH and remote-runtime paths. Happy to implement whichever direction you prefer — which would you like?
Activity
manuaudio commentedon Aug 11, 2026
I reproduced your trust-store measurements on a second macOS machine with a different Node version, and they hold — more starkly than your numbers suggest. That matters because one of your findings rules out a whole fix direction, and it deserves independent confirmation before anyone relies on it. It also points at an asymmetry between your two candidate directions that I think answers your question.
Verified against
upstream/mainat680a9d9bc5; measurements on macOS, Node v24.16.0 (yours reported 11 system certs, so this is a genuinely independent sample).Your
getCACertificates('system')finding is confirmedsystemreturns 5 here against 158 in the OS root keychain. Sotls.setDefaultCACertificates(tls.getCACertificates('system'))is not a fix on macOS, exactly as you said — and the gap is not a near-miss, it's two orders of magnitude off. Worth having that on the record from a second machine, since it's the load-bearing negative in your report.The asymmetry between your two directions
You flagged that
net.fetchhas no equivalent for thewscontrol socket. That's the deciding factor, and it cuts cleanly:profile-cloud-client.tsfetchrelay-http-client.ts×2relay-control-client.tswsnet.fetch(Chromium stack)tls.setDefaultCACertificates(...)wsbuilds its TLS connection on Node's own stack, so it inherits Node's default CA set — which means changing that default reaches all four call sites in one move, whilenet.fetchreaches three and leaves the socket that keeps Relay connected still failing. Given your symptom #3 ("signing in with the VPN off works, but turning the VPN back on makes Relay fail again"), the control socket is not the leg you can afford to leave out.The third option works — measured, not theorised
setDefaultCACertificatesaccepts arbitrary PEM, so the OS store can be read directly rather than via Node's deficientsystemaccessor:145 → 158, at runtime, no launch flag and no
NODE_EXTRA_CA_CERTS.The trap in that option, which is the part I'd most want a fix to get right
A corporate root does not live in
SystemRootCertificates.keychain. That file is Apple's built-in set. Admin- and MDM-installed roots — i.e. exactly theForward Trust CAin your chain — land in/Library/Keychains/System.keychain:(3 on my unmanaged machine; a managed one is where your corporate root would appear.) So an implementation that reads only the first keychain would load 158 certs, look like it worked, and still fail on the one certificate that matters. Both stores have to be read — and arguably the user login keychain too. That is the kind of thing that passes review and fails in the field, so it seemed worth naming explicitly.
Two smaller notes
Citation drift: the
wsconstruction is atrelay-control-client.ts:73, not:72—:72is the((url, token) =>arrow. Your other three call sites verify exactly as written (profile-cloud-client.ts:163,relay-http-client.ts:93and:126, both literally(input.fetch ?? globalThis.fetch)).There is already a seam at the socket.
relay-control-client.ts:70-77is:createSocketis injectable, and the default options object carries noagentand noca. So if maintainers prefer a narrow per-socket fix over a process-global one, there's a place for it that doesn't require inventing an abstraction —wspasses TLS options straight through totls.connect.What I did not verify
I confirmed the CA-set manipulation and the counts on my own machine; I do not have a TLS-inspecting network, so I did not reproduce the
SELF_SIGNED_CERT_IN_CHAINfailure or prove that a keychain-loaded root makes your specific handshake succeed. Thews-inherits-Node's-default-CA claim follows fromwsusingtls.connectrather than from a MITM test I ran. YourNODE_EXTRA_CA_CERTSresult is the strong evidence there — it already demonstrates that putting the root into Node's trust set is sufficient, andsetDefaultCACertificatesis just a runtime route to the same place.Your diagnostics PR (#13736) looks orthogonal to all of this and independently worth landing — a transport failure that reports
fetch failedandrelay_mint_failedis unactionable regardless of which transport direction wins.AmethystLiang commentedon Aug 11, 2026
thanks for reporting. looking into it
AmethystLiang commentedon Aug 11, 2026
thanks for reporting. looking into it
Jinwoo-H commentedon Aug 18, 2026
Hi — we have an experimental macOS build of the proposed TLS-trust fix available for testing:
This build is signed and notarized, but it is unlanded and experimental. It was built from PR #15208 at commit
641fdaf3d6.If you can, please try it while connected to the corporate VPN/TLS-inspection network and check:
If anything still fails, please reply with the Orca version shown in About, macOS version, which step failed, and the diagnostics/error code. Please avoid posting any company certificates or tokens.
Jinwoo-H commentedon Aug 26, 2026
We have a reworked fix in PR #16399, now rebased on latest
mainand green in required CI. A signed/notarized macOS ad-hoc build is being cut from the exact tested commit now.Could the original reporter (or anyone on a managed/corporate TLS-inspection network) try that build and report whether these four legs all work?
Please include Orca version, OS version, and which leg fails (plus the error code/message if shown). Please do not send certificates, tokens, or other secrets. The build link will be added here when publishing finishes.
Jinwoo-H commentedon Aug 26, 2026
The signed/notarized ad-hoc build is published from the final PR commit
7a5b66fd33:Release: https://github.com/stablyai/orca-adhoc/releases/tag/v1.4.189-adhoc.20260826043417
Downloads:
Please test the four legs listed above on the managed/corporate network: browser sign-in handoff / Cloud session exchange, Relay mint, Relay HTTP assignment, and Relay control + data WebSockets. Tell us the Orca version, OS, and which leg fails (plus any visible error code/message). Please do not send certificates, tokens, or other secrets.
nwparker commentedon Oct 18, 2026
Closing awaiting the managed-network retest explicitly requested on August 18 and August 26. The August 26 comment provides signed test builds and asks for results for Cloud sign-in exchange, Relay mint, HTTP assignment, and control/data WebSockets, with Orca/OS versions and any failing step's error code. No results have been posted since those requests.
This does not claim the TLS-trust fix shipped or that corporate-network support is resolved: #16399 and the related transport/diagnostics work remain separate open PRs. We can reopen this report with the requested results or a current-release reproduction. Please keep certificates and tokens private.