MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / chromeSharedLibOutcome

Function chromeSharedLibOutcome

packages/cli/src/browser/preflight.ts:136–154  ·  view source on GitHub ↗

* A Chrome binary can exist on disk yet be unlaunchable because its system * shared libraries (libnss3, libatk, ...) aren't installed — the dominant WSL * first-render failure. When that's the case, downgrade the "found" outcome to * a render-blocking error carrying the exact per-distro install c

(
  executablePath: string,
  found: EnvironmentCheckOutcome,
)

Source from the content-addressed store, hash-verified

134 * `ldd` can't run (probe inconclusive).
135 */
136function chromeSharedLibOutcome(
137 executablePath: string,
138 found: EnvironmentCheckOutcome,
139): EnvironmentCheckOutcome {
140 if (process.platform !== "linux") return found;
141 const probe = probeChromeSharedLibs(executablePath);
142 if (probe.probeUnavailable || probe.ok) return found;
143
144 const distro = detectLinuxDistro();
145 return {
146 name: "Chrome",
147 ok: false,
148 level: "error",
149 title: "Chrome cannot launch (missing system libraries)",
150 detail: `Chrome at ${executablePath} is missing shared libraries on ${distroLabel(distro)}: ${probe.missing.join(", ")}`,
151 hint: chromeDepsInstallCommand(distro.family),
152 path: executablePath,
153 };
154}
155
156async function checkChrome(browserPath?: string): Promise<EnvironmentCheckOutcome> {
157 if (browserPath) {

Callers 1

checkChromeFunction · 0.85

Calls 4

probeChromeSharedLibsFunction · 0.85
detectLinuxDistroFunction · 0.85
distroLabelFunction · 0.85
chromeDepsInstallCommandFunction · 0.85

Tested by

no test coverage detected