Repository navigation
Description
What happened
On a Linux host behind a TLS-inspecting corporate network, pages rendered with html_render / html_preview can't load external HTTPS resources, such as Mermaid from cdn.jsdelivr.net. The corporate root CA is in the system store, so curl and Node succeed against the same URLs. The server's headless Chrome rejects them with net::ERR_CERT_AUTHORITY_INVALID. The agent only sees that the preview had problems, not why.
Diagnosis
- On Linux, Chrome doesn't read
/etc/ssl/certs. It trusts its built-in root store plus the user NSS database in~/.pki/nssdb. A typical WSL or server host has no NSS database, so roots added withupdate-ca-certificatesnever reach the preview browser. t3 browser setupinstalls libraries, fonts and an AppArmor profile, but doesn't handle CA trust. The failure has no setup hint, unlike missing libraries.- Related:
htmlRender/publicProxy.tsalways connects upstream directly withNodeNet.connectand ignoresHTTPS_PROXY/HTTP_PROXY. On networks that need an explicit proxy, preview pages can't reach external resources at all. Chrome is pinned to that proxy with--proxy-server=socks5://127.0.0.1:<port>(headlessChrome.ts), so Chrome's own proxy settings don't help. - Possible directions: import the system CA bundle into a T3-managed NSS database for the preview profile (or have
t3 browser setupoffer to), and let the preview proxy chain throughHTTPS_PROXY.
Steps to reproduce
- Use a Linux host (seen on Ubuntu 24.04 under WSL2) whose outbound HTTPS is re-signed by a corporate root CA. Install that CA only in the system store (
/usr/local/share/ca-certificates+update-ca-certificates), with no~/.pki/nssdb. - Confirm that
curl https://cdn.jsdelivr.net/npm/mermaid@11/package.jsonreturns 200. - Run the preview browser T3 installed:
~/.t3/tools/chrome-headless-shell/linux64/156.0.8078.70/chrome-headless-shell --disable-gpu --dump-dom https://cdn.jsdelivr.net/npm/mermaid@11/package.json - It fails with
net::ERR_CERT_AUTHORITY_INVALID. - In T3, have an agent call
html_renderwith a page that loadshttps://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs. The diagram doesn't render.
Version
T3 server 0.1.6 (the triage CLI is also 0.1.6). The code is unchanged on main as of 2026-11-04.
Environment
T3 desktop app running natively on Windows. All agents and the T3 server backend run in WSL2 (Ubuntu 24.04.5 LTS, kernel 6.6.87.2, x64, Node v26.12.1), using the runtime the desktop app unpacks into ~/.t3/wsl-runtime. Server 0.1.6. The preview browser is chrome-headless-shell 156.0.8078.70 inside WSL. TLS-inspecting corporate network with no explicit proxy variables set. The corporate root CA is trusted by Windows and by the WSL system store, but not by the WSL Chrome's NSS store.
Evidence
ERROR:net/cert/internal/cert_issuer_source_aia.cc:135] AiaRequest::OnFetchCompleted got error -301
ERROR:net/socket/ssl_client_socket_impl.cc:949] handshake failed; returned -1, SSL error code 1, net_error -202
ERROR:components/headless/command_handler/headless_command_handler.cc:403] Page load failed: net::ERR_CERT_AUTHORITY_INVALID
The intercepted certificate chain is leaf -> corporate intermediate -> corporate root. Only the root is in the system store.Related issues
#30236 (same preview proxy rejects fake-IP DNS), #18555 (browser tools don't say why a page failed to load), #24542 (preview browser trust handling), #23424 (desktop backend uses system CAs), #16703, #16435, #21922 (other TLS-inspection and proxy failures).
Fix applied or workaround
Verified fix: create a user NSS database and import the corporate root into it. After this, the step 3 command loads the page and HTML previews render CDN resources.
sudo apt-get install -y --no-install-recommends libnss3-tools
mkdir -p ~/.pki/nssdb
certutil -d sql:$HOME/.pki/nssdb -N --empty-password
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n "Corporate Root CA" -i /usr/local/share/ca-certificates/<corporate-root>.crt
Filed by
Claude Code (Opus 5.5, claude-opus-5-5) via t3 triage.
Activity
vstratful commentedon Nov 23, 2026
Same root cause here, with a different trigger: the in-app browser's own tabs, not just
html_render.Setup: T3 Code Desktop 0.1.11 on Windows 11, WSL-only mode (Ubuntu), WSL server 0.1.11,
networkingMode=mirrored. Local Next.js dev servers use mkcert certificates (next dev --experimental-https).What happened: Every
https://localhost:<port>page failed in the browser pane with a certificate error, and there was no way to continue.Why:
preview_listreportsruntime: "server",headless: true), not in the desktop's Electron browser. The WSL backend isn't given the desktop browser channel (nodesktopBrowserFdin the WSL bootstrap inDesktopBackendConfiguration.ts).~/.pki/nssdb. The mkcert CA was in/usr/local/share/ca-certificates, and the NSS database was empty:libnss3-toolswasn't installed, somkcert -installnever added the CA to NSS.Verified fix (user side):
Then fully restart T3. Afterwards T3's
chrome-headless-shell(157.0.8103.78) loaded the mkcert-signedhttps://localhostpage. In a control run withHOMEpointed at an empty folder, the same load failed. After the restart, a real server-side tab loadedhttps://localhost:3000normally.Suggestions:
t3 browser setup, or the cert error page, could point at the NSS database, or import/usr/local/share/ca-certificatesinto a T3-managed NSS database.remote-access.mdsays "The desktop app shows its own environment's tabs directly", which isn't true in WSL-only mode. The Forwarded ports palette item is also hidden under mirrored networking (correctly, since the loopback is shared), but the docs don't say so. That sent this user looking for a port-forward fix that couldn't apply.Investigated by Claude Opus 5.5 (Claude Code) via T3 Code triage.