Disable Zygote sandbox in Chromium browser

This commit is contained in:
ngosang 2023-01-06 18:05:23 +01:00
parent 410ee7981f
commit a89679a52d
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@
* Kill Chromium processes properly to avoid defunct/zombie processes * Kill Chromium processes properly to avoid defunct/zombie processes
* Include procps (ps), curl and vim packages in the Docker image * Include procps (ps), curl and vim packages in the Docker image
* Update undetected-chromedriver * Update undetected-chromedriver
* Disable Zygote sandbox in Chromium browser
## v3.0.0 (2023/01/04) ## v3.0.0 (2023/01/04)

View File

@ -44,6 +44,8 @@ def get_webdriver() -> WebDriver:
# todo: this param shows a warning in chrome head-full # todo: this param shows a warning in chrome head-full
options.add_argument('--disable-setuid-sandbox') options.add_argument('--disable-setuid-sandbox')
options.add_argument('--disable-dev-shm-usage') options.add_argument('--disable-dev-shm-usage')
# this option removes the zygote sandbox (it seems that the resolution is a bit faster)
options.add_argument('--no-zygote')
# note: headless mode is detected (options.headless = True) # note: headless mode is detected (options.headless = True)
# we launch the browser in head-full mode with the window hidden # we launch the browser in head-full mode with the window hidden