Thanks for responding! The issue for us wasn't whether it worked once, because it did, but whether it actually worked reliably in production, which it didn't. I did spend most of a day to try to debug it, and got to the point where I could see that it was not cleaning up after itself. I posted about that on this issue (second comment)
https://issues.chromium.org/issues/362545030 The reply is as follows: "New headless is a real full blown Chrome running without visible UI. As such it does a lot of things under the hood which cannot be prevented without affecting core Chrome functionality.To print loads of PDFs you would be better off using the old headless forcing it with --headless=old switch. Keep in mind that old headless will be removed from Chrome binary soon and this option will not be available anymore. Instead, you will need to use the standalone version of old headless aka chrome headless shell, see details here: https://developer.chrome.com/blog/chrome-headless-shell" I suppose better testing of extensions and probably the test suite they run internally is more important to them than reliable isolation. If the new "chrome-headless-shell" doesn't appear fully baked yet, I don't mind sending off an inquiry as to why they then cut out --headless=old, but if you know to where I should direct it, it would be helpful (mailing list? bug report?). I would suggest "chromium-headless-shell" for a separate package - it may be older, but it is actually working. Also, I fully understand this is a niche compared to regular browser users. There are plenty of cloud services out there selling HTML to PDF or screenshots - but this is the only Free alternative I know of. PDFs are useful where documentation is required. Ole Den man. 3. feb. 2025 kl. 23.09 skrev Andres Salomon <[email protected]>: > Hi, > > Running --headless=new does work for me (with chromium 132), despite > what the bug reports say. I tried building headless_shell, but it > requires an additional patch to build and the resulting binary is > somehow larger[0] than content_shell, which we're planning to drop. So > if we did ship it, it would be in a separate package (eg, > 'chromium-headless-old'). > > Are you certain that --headless=new with additional args (eg, > --temp-profile or something) won't work for your use case? > > Thanks, > Andres > > [0] > root@hm90:/chromium-133.0.6943.35# strip out/Release/headless_shell > root@hm90:/chromium-133.0.6943.35# ls -lh out/Release/headless_shell > -rwxr-xr-x 1 root root 182M Feb 3 21:55 out/Release/headless_shell > root@hm90:/chromium-133.0.6943.35# strip out/Release/content_shell > root@hm90:/chromium-133.0.6943.35# ls -lh out/Release/content_shell > -rwxr-xr-x 1 root root 170M Feb 3 21:55 out/Release/content_shell > > > On 1/29/25 08:47, Ole Laursen wrote: > > Just upgraded > > > > $ chromium --version > > Chromium 132.0.6834.110 > > > > and it looks like the old headless mode is now gone > > > > chromium --headless=old > > Old Headless mode has been removed from the Chrome binary. Please use > > the new Headless mode > > (https://developer.chrome.com/docs/chromium/new-headless) or the > > chrome-headless-shell which is a standalone implementation of the old > > Headless mode (https://developer.chrome.com/blog/chrome-headless-shell). > > > > Just to recap: The "new" headless thing is different from the old. > > It's intended to be much closer to normal Chrome, and to be used for > > testing where you want that similarity (web apps and extensions) where > > as the "old" headless is supposed to be used for engine-like tasks, > > screenshots, PDF-generation, printing, etc. > > > > The new headless is available as --headless whereas the old headless > > is available in a separate binary. Would you consider shipping the new > > binary? It's a loss of functionality on upgrade otherwise. > > > > > > Ole > > > >

