Skip to content

[Bug]: Plain-HTTP Remote Web is still broken after the randomUUID white-screen patches #19667

Closed

Description

@mzdluo123

Operating system

Windows/macOS host; browser client on another machine via Tailscale/LAN

Orca version

Latest GitHub release v1.4.198 (2026-09-08). Also current main.

Details

Short summary:

#16232 / #16235 and #18096 / #18102 are real, but they are not a complete fix for Remote Web over plain HTTP. The official pairing UI still emits a non-secure origin, and the web bundle still calls crypto.randomUUID() in multiple other renderer paths.

How to reproduce:

  1. Desktop: Remote Orca server → Share this host → Other devices / Tailscale (100.x).
  2. Click Generate access link. The Open in browser URL is http://<tailscale-ip>:<port>/web-index.html#pairing=... with pairing endpoint ws://... (not HTTPS/wss).
  3. Open that URL from another device.

Actual result on v1.4.198:

  • window.isSecureContext === false
  • globalThis.crypto.randomUUID is undefined (Chromium hides it outside a secure context)
  • White screen:
store-E2SyM1oF.js:21 Uncaught TypeError: globalThis.crypto.randomUUID is not a function
    at oQ (store-E2SyM1oF.js:21:37448)
    at store-E2SyM1oF.js:21:37479

Minified site (import-time, so the page never paints):

function oQ(e){return`${e}:${globalThis.crypto.randomUUID()}`}
const Hc=new iQ(oQ("renderer"));

This is createAgentStatusAuthorityId('renderer') in src/shared/agent-status-observation.ts, constructed from src/renderer/src/lib/renderer-agent-status-observations.ts.

Changing the generated URL to https://<same-ip>:<port>/... is not a workaround: port 6768 speaks plain HTTP (ERR_SSL_PROTOCOL_ERROR). http://127.0.0.1 and native orca:// pairing still work.

Why #16235 / #18102 are incomplete:

  • #16235 injects createBrowserUuid only into the renderer authority singleton. The shared helper default remains globalThis.crypto.randomUUID().
  • #18102 only replaces the AiVault refresh token.
  • The same shipped store-*.js still contains other naked crypto.randomUUID() calls (workspace-cleanup scanId / consent / snapshot prune, etc.). Those throw after bootstrap.
  • The repo already documents this as a class of failures in src/renderer/src/lib/non-secure-context-crypto.repro.test.ts (missing randomUUID and crypto.subtle). Clipboard over the same origin was #10532.
  • The product still recommends this origin: the generator's Tailscale/LAN Open in browser field.

Expected result:

Either:

  1. Renderer/web never calls secure-context-only Web Crypto directly (crypto.randomUUID, unwrapped crypto.subtle). All UUID generation goes through createBrowserUuid. The existing non-secure-context repro imports the real web/store entry and the later UUID call sites, not just the helper; and
  2. Non-loopback pairing does not advertise a browser URL that cannot be a secure context. Terminate TLS (and use wss) for Tailscale/LAN browser access, or stop offering Open in browser for those addresses and keep orca:// / localhost only.

Related:

  • #16232 white-screen (still open; #16235 unmerged, last updated 2026-08-24)
  • #18096 Agents sidebar (still open; #18102 unmerged)
  • #10532 clipboard on the same insecure origin (closed)

This is not a user misconfiguration. The desktop generator produced the http://100.x link.

Activity

  1. aron-intframe commented on Sep 9, 2026

    @aron-intframe

    Reproduced the mechanism independently on a Tailscale 100.x origin. Adding two things: the throw is at import time, which is why it is a white screen rather than a degraded feature, and 127.0.0.1 is exactly the origin that hides it from dev and CI.

    What I ran. A static page served over plain HTTP on port 6768, bound to loopback, a Tailscale 100.x address and a public address on the same host. The module runs the minified shape from the report at module scope (function oQ(e){return ${e}:${globalThis.crypto.randomUUID()}} / const Hc=new iQ(oQ("renderer"))) and only then writes the app markup. Loaded with Playwright, Chromium 151.0.7922.34:

    chromium 151.0.7922.34
    --- http://127.0.0.1:6768/web-index.html
      isSecureContext = true | typeof crypto.randomUUID = function | typeof crypto.subtle = object
      #app rendered as: "Remote WebApp mounted, authority id renderer:c443fc44-cbe2-43c3-a5a0-2b5ac23aec67"
    --- http://100.123.150.77:6768/web-index.html
      isSecureContext = false | typeof crypto.randomUUID = undefined | typeof crypto.subtle = undefined
      #app rendered as: ""
      TypeError: globalThis.crypto.randomUUID is not a function
    --- http://178.63.66.29:6768/web-index.html
      isSecureContext = false | typeof crypto.randomUUID = undefined | typeof crypto.subtle = undefined
      #app rendered as: ""
      TypeError: globalThis.crypto.randomUUID is not a function
    

    All three URLs return HTTP 200 (curl -o /dev/null -w %{http_code} gives 200 on loopback and on 100.123.150.77). crypto.subtle is undefined on the same origins, so this really is a class and not one call site: anything that later reaches for subtle on the browser path breaks the same way.

    Why it survives review. Loopback is a secure context by definition, so a developer or a CI job that opens the web bundle on 127.0.0.1 gets randomUUID and paints. The only origins that fail are the ones the pairing UI actually advertises.

    Import-time, not use-time. On main at 98df62d8ff72cd51c3333751624efa3cf1a96041, src/shared/agent-status-observation.ts:196 is still the naked call, and src/renderer/src/lib/renderer-agent-status-observations.ts constructs at module scope:

    export const rendererAgentStatusObservations = new AgentStatusObservationSequencer(
      createAgentStatusAuthorityId('renderer')
    )

    The doc comment above it says "Nothing reads it yet (STA-4293)". So the value that stops the page from painting is one nothing consumes yet. Computing the authority id lazily on first read paints the page on the same insecure origin:

    ok     http://100.123.150.77:6768/lazy/web-index.html  (paints: first-paint,first-contentful-paint, shot 21ms, "Remote Web")
    

    That is not the fix -- the other crypto.randomUUID() call sites in the bundle still throw when they run, and the pairing UI still advertises a non-secure origin. But it converts "never paints" into "one feature fails", which is a different severity, for one line.

    Catching the class in CI. HTTP status cannot see this; both origins are 200 with a parsed DOM. What separates them is paint entries:

    ok     http://127.0.0.1:6768/web-index.html  (paints: first-paint,first-contentful-paint, shot 29ms, "Remote Web")
    BLANK  http://100.123.150.77:6768/web-index.html
           - ZERO paint entries (DOM is 271 chars) -- the browser parsed this page and drew nothing
           - no heading text on the page
           - visible text is 0 chars
    

    The existing non-secure-context-crypto.repro.test.ts deletes the APIs in a unit test, which catches helpers but not import-time call sites in the shipped bundle. A browser check pointed at a non-loopback plain-HTTP origin catches both, and would have caught #16232 too.

    We hit this exact shape a lot (200 back, DOM present, nothing drawn); the check we use for it is in our repo (ours): https://github.com/aron-intframe/agent-guards/blob/main/guards/paint-check.js

  2. added
    bug
    orca-remote-server
    os:macos
    on Sep 19, 2026
  3. added theissue type on Sep 19, 2026
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

    bugorca-remote-serveros:Windowsos:macos

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions