Add Firefox ESR support to e2e browser-helpers (Chrome fallback kept) - #275
Merged
Conversation
Chrome 147+ has a Page.captureScreenshot regression where full google-chrome-stable --headless --screenshot produces no image in CI containers, which made OctoPi's e2e-test exhaust its 30-min polling window and fail (the OctoPrint wizard test itself passed). Firefox's --screenshot CLI is stable across releases and ESR pins a major version for ~12 months, so prefer firefox-esr/firefox when present and keep google-chrome-stable/chromium/chromium-browser as fallback so other distros (e.g. FullPageOS) keep working unchanged. headless_screenshot now branches on the resolved browser family: Firefox uses --headless --no-remote --screenshot <file> --window-size=W,H (path as a separate arg), Chrome keeps its existing flag set. The size check, OCR validation, and retry logic are unchanged and work for both.
guysoft
force-pushed
the
feature/firefox-screenshot
branch
from
August 3, 2026 20:02
72ae693 to
1d33246
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Page.captureScreenshotregression: fullgoogle-chrome-stable --headless --screenshotproduces no image in CI containers. This made OctoPi'se2e-testexhaust its 30-min polling window and fail (the OctoPrint wizard test itself passed).browser-helpers.shto preferfirefox-esr/firefox(stable--screenshotCLI; ESR pins a major version for ~12 months), keepinggoogle-chrome-stable/chromium/chromium-browseras fallback so other distros (e.g. FullPageOS) keep working unchanged.headless_screenshotnow branches on the resolved browser family. Firefox uses--headless --no-remote --screenshot <file> --window-size=W,H(path as a separate arg); Chrome keeps its existing flag set. Size check, OCR validation, and retry logic are unchanged.Why Firefox ESR, not Camoufox
Camoufox is an anti-detect Firefox fork (irrelevant here), explicitly flagged "not production-stable", with a heavy pip + ~1.2 GB binary supply chain. Firefox ESR is stock, stable, and in the Mozilla Team PPA.
Test plan
docker-build.ymlrebuildsghcr.io/guysoft/custompios:devel.testing/Dockerfiletofirefox-esrand validates end-to-end (wizard screenshot captured, no timeout).find_headless_browserfinds no firefox, falls back to Chrome path.Context
OctoPi failing run: https://github.com/guysoft/OctoPi/actions/runs/30759697193/job/91545664616