Skip to content

x.com shows "Something went wrong" for minutes before the app appears (tracking) #80

Description

@codymullins

Loading https://x.com/nasa in the Starling browser first shows X's fallback page — "Something went wrong, but don't fret — let's give it another shot. Try again ⚠️ Some privacy related extensions may cause issues on x.com." The real app only appears minutes later. This is a tracking issue for the root causes, all verified on 2026-06-10 with repros on the real engine and Chromium baselines.

The mechanism

x.com's served HTML ships a hidden error panel (#ScriptLoadFailure, hidden by .r-hvic4v{display:none}) and three <script defer> bundles. Each bundle sets window.__SCRIPTS_LOADED__[name] at the end of its own execution. An inline watchdog runs at DOMContentLoaded (or immediately if document.readyState !== 'loading') and un-hides the panel when __SCRIPTS_LOADED__['main'] is unset. Per the HTML spec, defer scripts run before DOMContentLoaded, so in Chromium the watchdog only fires on a genuine load failure. In Starling it fires on every load.

Why the panel shows (each alone is sufficient — all three must be fixed)

Why the app takes minutes to appear

Bundle execution happens in the post-paint deferred pump and takes 2–2.5 minutes at current Starling JS engine speed (deferred.summary: … pump2=110668ms total=147706ms). That perf work is tracked separately (inline caches / hidden classes, on an unmerged branch). When main.js finally runs, React mounts into #react-root and replaces the panel.

Why the booted app is degraded (found on the same boot)

The parser failures (#74#76) share one blast-radius pattern: one parse error kills every webpack module in a chunk. Webpack caches the half-evaluated requiring module, which later surfaces as the deterministic Cannot access a lexical binding before initialization error seen from main.565e4e9a.js on every load.

Log noise and a real race found on the same boot

Suggested order

#70 + #71 (+ #72) remove the error page. #77, #73, and #74#76 clean up the booted app. #78 and #79 are engine hygiene and correctness, with #79 the deeper architectural one.

Full investigation details (timelines, repro harnesses, Chromium baselines) are in the linked issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    browserRelates to the browser subsystembugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions