Closed bug report

ARM64 containers: Chrome install command downloads an x86-64 Chrome, Generate silently never renders

anastasia · ·closed by Colby Knox

@Kyle

On ARM64 Linux containers, hero-studio's Chrome install instructions download an x86-64 Chrome, so Generate silently never renders (hero-studio 0.23.3)

Where the wrong build comes from: hero-studio tells you to install Chrome with

npx @puppeteer/browsers install chrome@stable --path ~/.cache/puppeteer

(renderer-paths.cjs chromeInstallCommand() line 113, platform.cjs line 136, doctor.mjs line 104, SKILL.md line 299). Chrome for Testing has no Linux ARM64 build, so on an aarch64 container this command downloads the x86-64 binary into ~/.cache/puppeteer/chrome/linux-156.0.8078.47/chrome-linux64/chrome (ELF machine 0x3e). That binary can never run here.

Why it's hard to spot:

  1. chromeCandidates() only checks that the file exists, so quickStatus() and hero-studio state report renderer.local.ok: true. Generate looks like it works but never produces a hero, and pressing it repeatedly does nothing.
  2. hero-studio doctor reports chrome --version failed and suggests an apt-get install of the Chrome library list. Installing that list doesn't help: the loader still says libglib-2.0.so.0: cannot open shared object file, because it looks for x86-64 libraries and apt installed /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.

Proof that an ARM Chromium fixes it: the same container already has Playwright's ARM64 Chromium. With CHROME=/home/adom/.cache/ms-playwright/chromium-1140/chrome-linux/chrome hero-studio doctor every check passes: chrome runs: Chromium 130.0.6723.31, headless launch: ok, renderer: local.

Suggested fixes:

  • In chromeInstallCommand(), on Linux arm64, don't suggest @puppeteer/browsers install chrome@stable. Suggest an ARM64 Chromium instead (Playwright's npx playwright install chromium, or the distro's chromium).
  • Add ~/.cache/ms-playwright/chromium-*/chrome-linux/chrome (and /usr/bin/chromium) to chromeCandidates() on Linux.
  • In doctor, check the binary's ELF architecture against process.arch and say "wrong CPU architecture" instead of printing the apt fix.
  • Have quickStatus() (or Generate) show an error when the chosen Chrome can't launch, so the button doesn't fail silently.

Environment: Adom container, Ubuntu 24.04 (noble), aarch64, Node renderer, puppeteer-core 24.43.1. The pup fallback isn't available from this container either, so there's no second path.

Related: #68 (filed earlier from the same session as "render view glitches"). This is the actual cause behind it.

1 Reply

Colby Knox ·

Fixed in hero-studio 0.23.5.

  • A Chrome built for another CPU is now skipped, and the renderer status says why instead of reporting ready.
  • Playwright's Chromium (~/.cache/ms-playwright/chromium-*/chrome-linux/chrome) is found automatically, newest first, so CHROME is no longer needed.
  • On Linux ARM64 the install advice is npx -y playwright install chromium && sudo npx -y playwright install-deps chromium.
  • doctor reports "wrong CPU architecture" instead of the library list.

Update with adom-wiki pkg install adom/hero-studio. You can delete the x86-64 Chrome under ~/.cache/puppeteer if you like, but it no longer gets in the way.

Colby Knox closed this ·

Log in to reply.