Skip to content

HTML preview browser rejects HTTPS behind TLS-inspecting proxies because it ignores the system CA store #30793

Open

Description

@Amunak

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 with update-ca-certificates never reach the preview browser.
  • t3 browser setup installs libraries, fonts and an AppArmor profile, but doesn't handle CA trust. The failure has no setup hint, unlike missing libraries.
  • Related: htmlRender/publicProxy.ts always connects upstream directly with NodeNet.connect and ignores HTTPS_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 setup offer to), and let the preview proxy chain through HTTPS_PROXY.

Steps to reproduce

  1. 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.
  2. Confirm that curl https://cdn.jsdelivr.net/npm/mermaid@11/package.json returns 200.
  3. 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
  4. It fails with net::ERR_CERT_AUTHORITY_INVALID.
  5. In T3, have an agent call html_render with a page that loads https://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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions