Anshul Kai
Anshul Kai

Reputation: 4128

Headless Chrome Terminates

When trying to run Headless Chrome on both mac and linux, it fails with the following error

Chrome --headless --disable-gpu https://www.yahoo.com
[0505/072239.922334:ERROR:browser_process_sub_thread.cc(217)] Waited 5 ms for network service

I'm testing with version Google Chrome 74.0.3729.131

Upvotes: 13

Views: 9914

Answers (1)

imp
imp

Reputation: 436

Try adding some of the following options:

chromeOptions.addArguments("--headless")
chromeOptions.addArguments("--no-sandbox")
chromeOptions.addArguments("--disable-dev-shm-usage")
chromeOptions.addArguments("--disable-gpu")
chromeOptions.addArguments("--disable-features=NetworkService") ##this did it for me
chromeOptions.addArguments("--window-size=1920x1080")
chromeOptions.addArguments("--disable-features=VizDisplayCompositor")

Upvotes: 7

Related Questions