Skip to content

Web client: right sidebar crashes — crypto.randomUUID unavailable in non-secure (plain HTTP) contexts #20464

Closed

Description

@minhtuancn

Summary

The web client crashes when opening the right sidebar on a workspace served over plain HTTP on a LAN — the panel renders the fallback "The right sidebar hit an error" in place of the Vault/AI panel content.

Environment

  • Orca web client (web-index.html), served over plain HTTP (e.g. http://10.20.10.103:6768)
  • Chromium-based browser. Plain-HTTP pages are non-secure contexts, where crypto.randomUUID is hidden.

Repro

  1. Open the web client URL on a LAN (plain HTTP).
  2. Pair, then click a repo/workspace in the left sidebar (opens the right sidebar).
  3. Right sidebar fails: "The right sidebar hit an error"; console shows:
TypeError: crypto.randomUUID is not a function
[right-sidebar] render crash contained by boundary TypeError: crypto.randomUUID is not a function

Root cause

Render crash originates in AiVaultPanel (right-sidebar/ai-vault-session-refresh.ts): the request token is minted with a raw crypto.randomUUID(), which does not exist in non-secure contexts. A repo-wide scan found ~20 more raw call sites across the renderer (skills, workspace-cleanup, sidebar, store/slices, native-chat, automations, settings, libs) plus one in shared/agent-status-observation.ts, all of which would throw the same way from the web client.

The codebase already has a context-safe helper — createBrowserUuid() (renderer/lib/browser-uuid.ts, falls back to getRandomValues/Math.random) — but most call sites were not using it.

Proposed fix

PR: Fixes # — migrate all renderer/scoped call sites to createBrowserUuid() (plus an equivalent inline fallback in the shared sequencer, which cannot import the renderer lib), and add a regression test that mints a request token with crypto.randomUUID unavailable.

Activity

  1. AmethystLiang commented on Sep 15, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  2. added
    bug
    on Sep 19, 2026
  3. added theissue type on Sep 19, 2026
  4. mmarabel commented on Sep 25, 2026

    @mmarabel
    Contributor

    This looks like the same plain-HTTP crypto.randomUUID crash that #22516 fixes (Remote Web loading over plain HTTP in a non-secure context). It may be worth checking against that PR once it lands.

  5. nwparker commented on Oct 6, 2026

    @nwparker
    Contributor

    Closing as completed after reading the issue discussion and checking the implementation currently on main.

    The AI Vault request token and all renderer/shared UUID call sites now use the shared non-secure-context-safe generator. The merged PR ports the right-sidebar regression from #20465 and records before/after verification against the built web client.

    Fixed by #22516.

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

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions