Repository navigation
webBrowser.openUrl fails to compile headless; blocks first-run finishInstall flow #865
Description
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:
langgetnodecodefailure (missing UI node definition) - Called from
startupScript.ut:234inside a try-catch - Silent failure: exception is caught and ignored
- Consequence: First-run setup URL is never opened in a browser
Impact:
- First-run
finishInstallflow 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:
- Implement
webBrowser.openUrlfor headless mode (opens in default browser via system call, if applicable) - Remove the call from
startupScript.ut:234if browser-opening is not applicable to headless/production mode - Make the error visible (log it) instead of silently catching
- 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) orxdg-open(Linux) orstart(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 instartupScript.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
finishInstallcompletes without errors - Works on macOS, Linux, Windows (or documented platform limitations)
If Option B:
-
startupScript.ut:234skipswebBrowser.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:234logs the error if browser-open fails - Setup URL is visible in logs as a fallback
- No silent failures
Related Context
- Found by: Unit 3.3+ startup validation
- Related issues: Phase 3.4 startup stabilization (owns first-run flow), Virgin.root ships firstRootRun=false, breaking firstRootRun contract; 9 integration tests depend on skipped init #855 (firstRootRun flag and onboarding)
- Code: startupScript.ut:234 (webBrowser.openUrl call), webBrowser verb definition
- Impact: First-run UX, setup flow, headless mode compatibility
- Phase context: Phase 3.4 owns startup and first-run experience
Activity
jsavin commentedon Aug 11, 2026
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.
jsavin commentedon Aug 11, 2026
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.
fix(odb): #881 repair LF-single-node corruption in webBrowser.openURL…