Skip to content

webBrowser.openUrl fails to compile headless; blocks first-run finishInstall flow #865

Open

Description

@jsavin

Rationale

webBrowser.openUrl fails to COMPILE headless (langgetnodecode failure) — not a runtime error; the browser-open path is dead code in frontier-cli. The verb exists but cannot be compiled/executed in headless mode due to missing UI dependencies. Currently non-fatal only because startupScript.ut:234 wraps it in a try-catch that silently swallows the error. Affects the first-run finishInstall flow (it wants to open the setup URL in a browser). Blocks Phase 3.4 startup stabilization work that owns the first-run onboarding experience.

Current State

Verified behavior (Unit 3.3+):

  • webBrowser.openUrl() cannot compile in headless mode
  • Error: langgetnodecode failure (missing UI node definition)
  • Called from startupScript.ut:234 inside a try-catch
  • Silent failure: exception is caught and ignored
  • Consequence: First-run setup URL is never opened in a browser

Impact:

  • First-run finishInstall flow is incomplete (no browser opening)
  • Silent error masks the issue (wrapped in try-catch)
  • Blocks full first-run UX validation
  • Affects Phase 3.4 startup stabilization (first-run/onboarding)

Desired Outcome

Either:

  1. Implement webBrowser.openUrl for headless mode (opens in default browser via system call, if applicable)
  2. Remove the call from startupScript.ut:234 if browser-opening is not applicable to headless/production mode
  3. Make the error visible (log it) instead of silently catching
  4. Document why browser-opening is skipped in headless mode

Recommendation

Option A (Recommended for first-run UX): Implement headless-compatible browser open

  • Use system open (macOS) or xdg-open (Linux) or start (Windows)
  • Pass the setup URL to the system default browser
  • Return success/failure to caller
  • Log errors (don't silent-catch)

Option B (Acceptable for production-only headless): Skip in headless mode

  • Remove or guard the webBrowser.openUrl() call in startupScript.ut:234
  • Document: "First-run setup URL not opened in headless mode"
  • Provide manual instructions for users to complete setup

Option C (Minimum fix): Make the error visible

  • Replace silent try-catch with a logged attempt
  • If open fails, log the setup URL so users can complete it manually
  • Prevents debugging surprises later

Exit Criteria

If Option A:

  • webBrowser.openUrl() compiles and runs in headless mode
  • System browser opens with the provided URL
  • First-run finishInstall completes without errors
  • Works on macOS, Linux, Windows (or documented platform limitations)

If Option B:

  • startupScript.ut:234 skips webBrowser.openUrl() in headless context
  • Documentation explains first-run browser-opening is GUI-only
  • Alternative instructions provided for headless setup flow

If Option C:

  • startupScript.ut:234 logs the error if browser-open fails
  • Setup URL is visible in logs as a fallback
  • No silent failures

Related Context

Activity

  1. added
    priority/p2Medium priority - nice to have
    type/bugDefect in existing functionality, needs fix
    on Aug 10, 2026
  2. jsavin commented on Aug 11, 2026

    @jsavin
    OwnerAuthor

    Re-scoped by two independent findings (2026-08-11): webBrowser.openUrl's compile failure is STORED SCRIPT CORRUPTION in Virgin.root, not a headless limitation. (1) It fails to compile on the pristine, unmodified, firstRootRun=false Virgin.root (-e 'webBrowser.openUrl(...)' -> "Can't compile this script because of a syntax error"), fully independent of startup mode. (2) The #866 corpus sweep independently found 13 PRE-COMPILE-FAIL scripts already broken in the stored DB. Repair path: after the #866 scanner fix lands, a reinstall-once repair sweep (reinstall converges corrupted stored state per #866's findings). This script is now the DIRECT blocker for #855's flag flip: with firstRootRun=true and #859 fixed, the remaining 9 test failures all trace to startupScript reaching openUrl. Cross-reference #866, #855, #859.

  3. jsavin commented on Aug 11, 2026

    @jsavin
    OwnerAuthor

    ROOT CAUSE IDENTIFIED: webBrowser.openURL failure is caused by LF-single-node script corruption (#881), NOT missing headless verb implementation.

    Script body has embedded LF (0x0A) bytes with zero CR (corrupted .ut import that skipped LF→CR normalization).

    Fix is cheap and proven: Reinstall via script.newScriptObject (does LF→CR normalization automatically) — tested, works on pre-#866-fix binaries, persists across fileMenu.save + restart.

    Update: This issue should be closed once #881 is fixed (webBrowser.openURL repaired via script.newScriptObject reinstall). The root cause is not a headless verb gap but stored data corruption.

    See #881 for details and repair methodology.

  4. added a commit that references this issue on Aug 11, 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

    priority/p2Medium priority - nice to havescope/quick-win< 4 hours, obvious solutiontype/bugDefect in existing functionality, needs fixworkstream/verb-portingKernel verb implementation and bindings

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions