Closed gadenbuie closed 2 months ago
Right now I initiate the chrome session like this.. and I get the error 'Cannot find an available port. Please try again.'
chromote::set_default_chromote_object( chromote::Chromote$new(chromote::Chrome$new( args = c("--disable-gpu", "--no-sandbox", "--mute-audio", "--disable-timeouts-for-profiling", "--disable-dev-shm-usage", c("--force-color-profile", "srgb")) )) )
Is is suggested to add --headless=new ?? like below?
chromote::set_default_chromote_object( chromote::Chromote$new(chromote::Chrome$new( args = c("--disable-gpu", "--no-sandbox", "--mute-audio", "--disable-timeouts-for-profiling", "--disable-dev-shm-usage", c("--force-color-profile", "srgb"), c("--headless", "new") ) )) )
See background in #171 Fixes #149
This PR adds an internal
chrome_headless_mode()
function that consults thechromote.headless
option or theCHROMOTE_HEADLESS
environment variable (checked in that order). Allowed values are"old"
and"new"
, the default is currently set to"old"
to minimize disruption for chromote users.Prior to this PR, users could not customize the
--headless
flag, meaning they could not opt into--headless=new
before it became the default or opt out of it with--headless=old
now thatnew
is the default.Choosing
old
as the default gives us some time to adjust to changes in Chrome upstream.