garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.66k stars 602 forks source link

Puppeteer old Headless deprecation warning #1485

Closed neclimdul closed 7 months ago

neclimdul commented 1 year ago

Seeing a bunch of these in the latest release on docker hub.

  Puppeteer old Headless deprecation warning:
    In the near feature `headless: true` will default to the new Headless mode
    for Chrome instead of the old Headless implementation. For more
    information, please see https://developer.chrome.com/articles/new-headless/.
    Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
    If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.

Seems mostly informational and not problematic but there's just a swarm of them when testing. Quick skim looks to be caused by the headless: <!!!config.debugWindow> logic which passes true. The boolean cast also means we can't put 'new' in the config and "opt in" so I haven't tested if opting in is functional or not.

garris commented 1 year ago

Thanks for raising! Looks like we should update this behavior to allow updating with non-bool values and to make a decision on how backstop should interpret the old backstop default value going forward. Would be happy to review a PR on this. Cheers

tkrah commented 1 year ago

The new mode however should be treated with care - e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=1440046 the performance loss is extreme and at least for me in docker I can't even use the new mode because angle fails to initialize the egl rendering acceleration and just quits, I am forced at the moment to use the "old" one and I guess I am not alone with that. So if the new one is considered make it configurable for the user and better stay on the old one for the moment.

alexd3d commented 8 months ago

Guys, thanks a lot for great tool! Just came across this issue too. If we won't switch to new headless, it would be great to have some additional config param for BackstopJS that regulates verbosity of console. I have 41 test and console looks really scarry with all that millions lines that are logged. Would be great that we could at least : 1) turn on\off yellow warnings about old headless deprecated 2) turn on\off console messages that come from tested website's 3) the same - with cookies content loaded logs. Maybe it's possible now but I couldn't find? Thanks!

dgrebb commented 7 months ago

@alexd3d FYA hoping to get this merged in soon: #1511

@garris this is a super-small adjustment which should work in all cases backwards and forwards :)

dgrebb commented 6 months ago

Another update on this with PR #1535 1535

Playwright is going to stay defaulted to "old" headless mode for now, but Puppeteer will start default to new if/when #1535 is merged.

@tkrah I included a fallback for "old" in Puppeteer, which, ironically, can be set by passing "headless": true in the config.