support chrome-headless-shell
(old headless mode)
#918
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.
browsershot/bin/browser.cjs
Line 95 in 02d1764
In current Puppeteer versions (v22+ according to the docs),
{headless: true}
actually launches the new headless mode, while{headless: 'shell'}
launches the old mode:This makes it currently impossible to use the old headless mode with Browsershot, which is our preferred mode for creating PDFs, and the only mode that, in our experience, actually works with Basic Auth.
See https://developer.chrome.com/blog/chrome-headless-shell for more details.
Note: We were previously able to work around this issue by enabling the old headless mode the following way instead:
As of Puppeteer v24.1.0, this workaround unfortunately does not work anymore, as
old
is not a valid option anymore: