Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for headless=new #379

Merged
merged 4 commits into from
Sep 14, 2023
Merged

Support for headless=new #379

merged 4 commits into from
Sep 14, 2023

Conversation

route
Copy link
Member

@route route commented Jul 16, 2023

Addresses #352

@route route changed the title Initial support for headless=new Support for headless=new Jul 16, 2023
@route route mentioned this pull request Aug 17, 2023
@ghost
Copy link

ghost commented Sep 5, 2023

Anything we can do to help get this implemented @route?

@route
Copy link
Member Author

route commented Sep 11, 2023

@lifesaverluke not that I can think of, I'm on it but I was sick and on the road.

@route
Copy link
Member Author

route commented Sep 11, 2023

It looks like even though I can be able to land support with frames, there's at least one quite major regression for Chrome which shows duplicated requests and there's an event missing which is quite crucial for network. So it's not gonna happen until they fix it.

@ghost
Copy link

ghost commented Sep 11, 2023

A thing that changed for sure is that last_exchange is now the request to favicon.ico instead of the document. The old headless mode never loaded favicons, so that change makes sense.

Maybe we just need to adjust the tests?

@route
Copy link
Member Author

route commented Sep 11, 2023

A thing that changed for sure is that last_exchange is now the request to favicon.ico instead of the document. The old headless mode never loaded favicons, so that change makes sense.

Maybe we just need to adjust the tests?

No it’s not that simple, networking is broken

@ghost
Copy link

ghost commented Sep 11, 2023

Bit weird that puppeteer / playwright etc do work with headless=new? What's the difference?

@route
Copy link
Member Author

route commented Sep 12, 2023

@lifesaverluke in general it works, but there are a lot of tests broken for networking. The design is different, the architecture is also different. But looks like I found solution to make it work disable-site-isolation-trials

In general the issue is with frames only https://www.chromium.org/developers/design-documents/oop-iframes/

@route
Copy link
Member Author

route commented Sep 14, 2023

Since "new" mode has a bug with file download behavior it's not default now, but you can turn on "new" mode if it satisfies your needs.

@route route merged commit 07b9354 into main Sep 14, 2023
12 checks passed
@route route deleted the headless-new branch September 14, 2023 10:16
@sandstrom
Copy link

@route Awesome! 😄

Will there be a new release later, with this included?

@route
Copy link
Member Author

route commented Sep 14, 2023

released

@janko
Copy link
Contributor

janko commented Oct 13, 2023

@route I appreciate the addition! Could we also get a new release of Cuprite? 🙏🏻 The current version locks Ferrum to 0.13.x, so I cannot upgrade to 0.14.x.

@route
Copy link
Member Author

route commented Oct 14, 2023

@janko yep I was going to do that, but need to do some stuff offline ;) life is life)

@janko
Copy link
Contributor

janko commented Oct 15, 2023

@route Of course, as a fellow open source maintainer, I totally understand 😉 I really appreciate all the work you did on Ferrum/Cuprite, it brought us tremendous benefits in my current company 🙌🏻

I decided we needed the new headless mode when I encountered a system test that was failing in old headless mode and passing in headful mode. We were able to use the new headless mode with current Cuprite by passing browser_options: { "headless" => "new" } to the driver, so not a blocker at all.

@route
Copy link
Member Author

route commented Oct 20, 2023

@janko Very good article btw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants