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
proposal: do not start a browser in headless mode by default #845
Comments
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
This was suggested by @kenshaw in a private talk.
The purpose is to make it easy for new comers. As of now, we dedicated the first question in the Q&A section for this case:
But that example just shows how to override the default options, it does not show how to disable the
headless
mode.The
chromedp.Headless
option is just for enabling the headless mode; to disable the headless mode, the user should specify this option:chromedp.Flag("headless", false)
And maybe the following two options too:
chromedp.Flag("hide-scrollbars", false)
chromedp.Flag("mute-audio", false)
That is not so obvious for a new comer.
This is a breaking change. So I'm filing this issue in the hope that the current users of
chromedp
will be aware of this change.Changes
We will remove the
chromedp.Headless
option from thechromedp.DefaultExecAllocatorOptions
.Affected Users
All users that want to use
chromedp
in headless mode will be affected. The good news is that some customized browsers already run in headless mode even without the--headless
option. chromedp/headless-shell is among such kind of browsers. So thechromedp/headless-shell
users won't be affected by this change.The affected users have to do something like this after the change:
Otherwise, the browser will fail to start in headless environment with errors like this:
The text was updated successfully, but these errors were encountered: