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

Pass headless: "new" to puppeteer.launch() #1279

Closed
macbre opened this issue Jun 8, 2023 · 2 comments · Fixed by #1281
Closed

Pass headless: "new" to puppeteer.launch() #1279

macbre opened this issue Jun 8, 2023 · 2 comments · Fixed by #1281
Assignees

Comments

@macbre
Copy link
Owner

macbre commented Jun 8, 2023

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/.](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.
@macbre macbre self-assigned this Jun 8, 2023
@macbre macbre changed the title Passing headless: "new" to puppeteer.launch() Pass headless: "new" to puppeteer.launch() Jun 8, 2023
@gmetais
Copy link
Contributor

gmetais commented Jun 8, 2023

Great, happy to hear that!

@macbre
Copy link
Owner Author

macbre commented Jun 9, 2023

$ node ./examples/index.js 
phantomas v2.6.0 loaded from /Users/macbre/git/phantomas
Opening <http:https://127.0.0.1:8888/dom-operations.html> ...

  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.

macbre added a commit that referenced this issue Jun 12, 2023
* Use the new head{-less,-full} mode for Chrome

Resolves #1279

See https://developer.chrome.com/articles/new-headless/

* nginx: make /favicon.ico return 204 No Content

The default 404 response is served as an HTML which skews our asserted metrics.

$ curl 0.0.0.0:8888/favicon.ico -I
HTTP/1.1 204 No Content
Date: Fri, 09 Jun 2023 18:41:05 GMT
Connection: keep-alive
Server: nginx

* Tests: update the assertions to include the requests made to /favicon.ico

* test/integration.test.js: add some typing and be less strict when asserting offenders

* Update doc links

* More metrics assertions updated

* test/integration-spec.yaml: more metrics updated

* browser: make sure to default the viewport to a specific size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants