From 003405cbbd1f785cd002cc6f3b6508e3b4b05dd0 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 17 Jan 2025 12:13:54 +0100 Subject: [PATCH] chrome - change back to `--headless` as default. And keep option to set it to old for QUARTO_CHROMIUM specified version --- news/changelog-1.7.md | 1 + src/core/cri/cri.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md index 4963b044da..864ac5cbb9 100644 --- a/news/changelog-1.7.md +++ b/news/changelog-1.7.md @@ -66,3 +66,4 @@ All changes included in 1.7: - ([#11441](https://github.com/quarto-dev/quarto-cli/issues/11441)): Don't add newlines around shortcodes during processing. - ([#11643](https://github.com/quarto-dev/quarto-cli/issues/11643)): Improve highlighting of nested code block inside markdown code block, i.e. using ` ```{{python}} ` or ` ```python ` inside ` ````markdown` fenced code block. - ([fb38eb5](https://github.com/quarto-dev/quarto-cli/commit/fb38eb56c11e09f44cef58fd3b697ff24bb5a3f3)) Use the `latest` parser for Acorn when analyzing JS code imported from OJS blocks. +- ([#10532](https://github.com/quarto-dev/quarto-cli/issues/10532)): Quarto changed default of `--headless=old` to `--headless` as [Chrome 132 has removed old headless mode](https://developer.chrome.com/blog/removing-headless-old-from-chrome) and only support new mode. For using old mode, `QUARTO_CHROMIUM` could be set to a [new `chrome-headless-shell` binary](https://developer.chrome.com/blog/chrome-headless-shell) or too an older chrome version (between 128 and 132) and `QUARTO_CHROMIUM_HEADLESS_MODE` set to `old` for using old headless mode with that compatabitle version. diff --git a/src/core/cri/cri.ts b/src/core/cri/cri.ts index 08dcd4498d..0ab03ce81b 100644 --- a/src/core/cri/cri.ts +++ b/src/core/cri/cri.ts @@ -85,7 +85,7 @@ export async function criClient(appPath?: string, port?: number) { const app: string = appPath || await getBrowserExecutablePath(); // Allow to adapt the headless mode depending on the Chrome version - const headlessMode = getenv("QUARTO_CHROMIUM_HEADLESS_MODE", "old"); + const headlessMode = getenv("QUARTO_CHROMIUM_HEADLESS_MODE", "none"); const cmd = [ app, @@ -97,6 +97,9 @@ export async function criClient(appPath?: string, port?: number) { // move to the new mode. We'll use `--headless=old` as the default for now // until the new mode is more stable, or until we really pin a version as default to be used. // This is also impacting in chromote and pagedown R packages and we could keep syncing with them. + // EDIT: 17/01/2025 - old mode is gone in Chrome 132. Let's default to new mode to unbreak things. + // Best course of action is to pin a version of Chrome and use the chrome-headless-shell more adapted to our need. + // ref: https://developer.chrome.com/blog/chrome-headless-shell `--headless${headlessMode == "none" ? "" : "=" + headlessMode}`, "--no-sandbox", "--disable-gpu",