You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I can't see any Chrome browser window
By default, Chrome is run in headless mode. See DefaultExecAllocatorOptions, and an example to override the default options.
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 the chromedp.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 the chromedp/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:
2021/06/03 06:35:49 chrome failed to start:
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
The text was updated successfully, but these errors were encountered:
ZekeLu
added a commit
to ZekeLu/chromedp
that referenced
this issue
Jun 4, 2021
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: