I'm trying to open a website with selenium chromedriver. I already added some arguments that I saw in other similar issues but it didn't solve problem. I've basically this code:
String baseUrl = "https://somesite.com";
System.setProperty("webdriver.chrome.driver", "/usr/bin/google-chrome");
ChromeDriverService service = ChromeDriverService.createDefaultService();
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
options.addArguments("--disable-infobars");
options.addArguments("--disable-gpu");
options.addArguments("--disable-software-rasterizer");
options.addArguments("no-sandbox");
options.addArguments("headless");
options.addArguments("--enable-native-gpu-memory-buffers");
driver = new ChromeDriver(service, options);
driver.get(baseUrl);
When I run the above code, chrome opens but page doesn't change. Also it gives this output:
[61263:61263:0903/005049.885829:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
why is this happening?
Note: My OS is ubuntu 20.04.